aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn
diff options
context:
space:
mode:
authorvitalyisaev <vitalyisaev@ydb.tech>2023-12-12 21:55:07 +0300
committervitalyisaev <vitalyisaev@ydb.tech>2023-12-12 22:25:10 +0300
commit4967f99474a4040ba150eb04995de06342252718 (patch)
treec9c118836513a8fab6e9fcfb25be5d404338bca7 /vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn
parent2ce9cccb9b0bdd4cd7a3491dc5cbf8687cda51de (diff)
downloadydb-4967f99474a4040ba150eb04995de06342252718.tar.gz
YQ Connector: prepare code base for S3 integration
1. Кодовая база Коннектора переписана с помощью Go дженериков так, чтобы добавление нового источника данных (в частности S3 + csv) максимально переиспользовало имеющийся код (чтобы сохранялась логика нарезания на блоки данных, учёт трафика и пр.) 2. API Connector расширено для работы с S3, но ещё пока не протестировано.
Diffstat (limited to 'vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn')
-rw-r--r--vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go94
-rw-r--r--vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn_test.go80
-rw-r--r--vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go3
-rw-r--r--vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/gotest/ya.make5
-rw-r--r--vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go51
-rw-r--r--vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host_test.go75
-rw-r--r--vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go75
-rw-r--r--vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition_test.go102
-rw-r--r--vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go343
-rw-r--r--vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/ya.make23
10 files changed, 851 insertions, 0 deletions
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go
new file mode 100644
index 0000000000..e6223dd3b3
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn.go
@@ -0,0 +1,94 @@
+package awsrulesfn
+
+import (
+ "strings"
+)
+
+// ARN provides AWS ARN components broken out into a data structure.
+type ARN struct {
+ Partition string
+ Service string
+ Region string
+ AccountId string
+ ResourceId OptionalStringSlice
+}
+
+const (
+ arnDelimiters = ":"
+ resourceDelimiters = "/:"
+ arnSections = 6
+ arnPrefix = "arn:"
+
+ // zero-indexed
+ sectionPartition = 1
+ sectionService = 2
+ sectionRegion = 3
+ sectionAccountID = 4
+ sectionResource = 5
+)
+
+// ParseARN returns an [ARN] value parsed from the input string provided. If
+// the ARN cannot be parsed nil will be returned, and error added to
+// [ErrorCollector].
+func ParseARN(input string) *ARN {
+ if !strings.HasPrefix(input, arnPrefix) {
+ return nil
+ }
+
+ sections := strings.SplitN(input, arnDelimiters, arnSections)
+ if numSections := len(sections); numSections != arnSections {
+ return nil
+ }
+
+ if sections[sectionPartition] == "" {
+ return nil
+ }
+ if sections[sectionService] == "" {
+ return nil
+ }
+ if sections[sectionResource] == "" {
+ return nil
+ }
+
+ return &ARN{
+ Partition: sections[sectionPartition],
+ Service: sections[sectionService],
+ Region: sections[sectionRegion],
+ AccountId: sections[sectionAccountID],
+ ResourceId: splitResource(sections[sectionResource]),
+ }
+}
+
+// splitResource splits the resource components by the ARN resource delimiters.
+func splitResource(v string) []string {
+ var parts []string
+ var offset int
+
+ for offset <= len(v) {
+ idx := strings.IndexAny(v[offset:], "/:")
+ if idx < 0 {
+ parts = append(parts, v[offset:])
+ break
+ }
+ parts = append(parts, v[offset:idx+offset])
+ offset += idx + 1
+ }
+
+ return parts
+}
+
+// OptionalStringSlice provides a helper to safely get the index of a string
+// slice that may be out of bounds. Returns pointer to string if index is
+// valid. Otherwise returns nil.
+type OptionalStringSlice []string
+
+// Get returns a string pointer of the string at index i if the index is valid.
+// Otherwise returns nil.
+func (s OptionalStringSlice) Get(i int) *string {
+ if i < 0 || i >= len(s) {
+ return nil
+ }
+
+ v := s[i]
+ return &v
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn_test.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn_test.go
new file mode 100644
index 0000000000..bab7f86110
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/arn_test.go
@@ -0,0 +1,80 @@
+package awsrulesfn
+
+import (
+ "github.com/google/go-cmp/cmp"
+ "testing"
+)
+
+func TestParseARN(t *testing.T) {
+ cases := []struct {
+ input string
+ expect *ARN
+ }{
+ {
+ input: "invalid",
+ expect: nil,
+ },
+ {
+ input: "arn:nope",
+ expect: nil,
+ },
+ {
+ input: "arn:aws:ecr:us-west-2:123456789012:repository/foo/bar",
+ expect: &ARN{
+ Partition: "aws",
+ Service: "ecr",
+ Region: "us-west-2",
+ AccountId: "123456789012",
+ ResourceId: []string{"repository", "foo", "bar"},
+ },
+ },
+ {
+ input: "arn:aws:elasticbeanstalk:us-east-1:123456789012:environment/My App/MyEnvironment",
+ expect: &ARN{
+ Partition: "aws",
+ Service: "elasticbeanstalk",
+ Region: "us-east-1",
+ AccountId: "123456789012",
+ ResourceId: []string{"environment", "My App", "MyEnvironment"},
+ },
+ },
+ {
+ input: "arn:aws:iam::123456789012:user/David",
+ expect: &ARN{
+ Partition: "aws",
+ Service: "iam",
+ Region: "",
+ AccountId: "123456789012",
+ ResourceId: []string{"user", "David"},
+ },
+ },
+ {
+ input: "arn:aws:rds:eu-west-1:123456789012:db:mysql-db",
+ expect: &ARN{
+ Partition: "aws",
+ Service: "rds",
+ Region: "eu-west-1",
+ AccountId: "123456789012",
+ ResourceId: []string{"db", "mysql-db"},
+ },
+ },
+ {
+ input: "arn:aws:s3:::my_corporate_bucket/exampleobject.png",
+ expect: &ARN{
+ Partition: "aws",
+ Service: "s3",
+ Region: "",
+ AccountId: "",
+ ResourceId: []string{"my_corporate_bucket", "exampleobject.png"},
+ },
+ },
+ }
+ for _, c := range cases {
+ t.Run(c.input, func(t *testing.T) {
+ actual := ParseARN(c.input)
+ if diff := cmp.Diff(c.expect, actual); diff != "" {
+ t.Errorf("expect ARN match\n%s", diff)
+ }
+ })
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go
new file mode 100644
index 0000000000..d5a365853f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/doc.go
@@ -0,0 +1,3 @@
+// Package awsrulesfn provides AWS focused endpoint rule functions for
+// evaluating endpoint resolution rules.
+package awsrulesfn
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/gotest/ya.make b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/gotest/ya.make
new file mode 100644
index 0000000000..f13e38901c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/gotest/ya.make
@@ -0,0 +1,5 @@
+GO_TEST_FOR(vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn)
+
+LICENSE(Apache-2.0)
+
+END()
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go
new file mode 100644
index 0000000000..637e5fc18e
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host.go
@@ -0,0 +1,51 @@
+package awsrulesfn
+
+import (
+ "net"
+ "strings"
+
+ smithyhttp "github.com/aws/smithy-go/transport/http"
+)
+
+// IsVirtualHostableS3Bucket returns if the input is a DNS compatible bucket
+// name and can be used with Amazon S3 virtual hosted style addressing. Similar
+// to [rulesfn.IsValidHostLabel] with the added restriction that the length of label
+// must be [3:63] characters long, all lowercase, and not formatted as an IP
+// address.
+func IsVirtualHostableS3Bucket(input string, allowSubDomains bool) bool {
+ // input should not be formatted as an IP address
+ // NOTE: this will technically trip up on IPv6 hosts with zone IDs, but
+ // validation further down will catch that anyway (it's guaranteed to have
+ // unfriendly characters % and : if that's the case)
+ if net.ParseIP(input) != nil {
+ return false
+ }
+
+ var labels []string
+ if allowSubDomains {
+ labels = strings.Split(input, ".")
+ } else {
+ labels = []string{input}
+ }
+
+ for _, label := range labels {
+ // validate special length constraints
+ if l := len(label); l < 3 || l > 63 {
+ return false
+ }
+
+ // Validate no capital letters
+ for _, r := range label {
+ if r >= 'A' && r <= 'Z' {
+ return false
+ }
+ }
+
+ // Validate valid host label
+ if !smithyhttp.ValidHostLabel(label) {
+ return false
+ }
+ }
+
+ return true
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host_test.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host_test.go
new file mode 100644
index 0000000000..254c9fab4f
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/host_test.go
@@ -0,0 +1,75 @@
+package awsrulesfn
+
+import (
+ "testing"
+)
+
+func TestIsVirtualHostableS3Bucket(t *testing.T) {
+ cases := map[string]struct {
+ input string
+ allowSubDomains bool
+ expect bool
+ }{
+ "single label no split": {
+ input: "abc123-",
+ expect: true,
+ },
+ "single label no split too short": {
+ input: "a",
+ expect: false,
+ },
+ "single label with split": {
+ input: "abc123-",
+ allowSubDomains: true,
+ expect: true,
+ },
+ "multiple labels no split": {
+ input: "abc.123-",
+ expect: false,
+ },
+ "multiple labels with split": {
+ input: "abc.123-",
+ allowSubDomains: true,
+ expect: true,
+ },
+ "multiple labels with split invalid label": {
+ input: "abc.123-...",
+ allowSubDomains: true,
+ expect: false,
+ },
+ "max length host label": {
+ input: "012345678901234567890123456789012345678901234567890123456789123",
+ expect: true,
+ },
+ "too large host label": {
+ input: "0123456789012345678901234567890123456789012345678901234567891234",
+ expect: false,
+ },
+ "too small host label": {
+ input: "",
+ expect: false,
+ },
+ "lower case only": {
+ input: "AbC",
+ expect: false,
+ },
+ "like IP address": {
+ input: "127.111.222.123",
+ expect: false,
+ },
+ "multiple labels like IP address": {
+ input: "127.111.222.123",
+ allowSubDomains: true,
+ expect: false,
+ },
+ }
+
+ for name, c := range cases {
+ t.Run(name, func(t *testing.T) {
+ actual := IsVirtualHostableS3Bucket(c.input, c.allowSubDomains)
+ if e, a := c.expect, actual; e != a {
+ t.Fatalf("expect %v hostable bucket, got %v", e, a)
+ }
+ })
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go
new file mode 100644
index 0000000000..ba6032758a
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition.go
@@ -0,0 +1,75 @@
+package awsrulesfn
+
+import "regexp"
+
+// Partition provides the metadata describing an AWS partition.
+type Partition struct {
+ ID string `json:"id"`
+ Regions map[string]RegionOverrides `json:"regions"`
+ RegionRegex string `json:"regionRegex"`
+ DefaultConfig PartitionConfig `json:"outputs"`
+}
+
+// PartitionConfig provides the endpoint metadata for an AWS region or partition.
+type PartitionConfig struct {
+ Name string `json:"name"`
+ DnsSuffix string `json:"dnsSuffix"`
+ DualStackDnsSuffix string `json:"dualStackDnsSuffix"`
+ SupportsFIPS bool `json:"supportsFIPS"`
+ SupportsDualStack bool `json:"supportsDualStack"`
+}
+
+type RegionOverrides struct {
+ Name *string `json:"name"`
+ DnsSuffix *string `json:"dnsSuffix"`
+ DualStackDnsSuffix *string `json:"dualStackDnsSuffix"`
+ SupportsFIPS *bool `json:"supportsFIPS"`
+ SupportsDualStack *bool `json:"supportsDualStack"`
+}
+
+const defaultPartition = "aws"
+
+func getPartition(partitions []Partition, region string) *PartitionConfig {
+ for _, partition := range partitions {
+ if v, ok := partition.Regions[region]; ok {
+ p := mergeOverrides(partition.DefaultConfig, v)
+ return &p
+ }
+ }
+
+ for _, partition := range partitions {
+ regionRegex := regexp.MustCompile(partition.RegionRegex)
+ if regionRegex.MatchString(region) {
+ v := partition.DefaultConfig
+ return &v
+ }
+ }
+
+ for _, partition := range partitions {
+ if partition.ID == defaultPartition {
+ v := partition.DefaultConfig
+ return &v
+ }
+ }
+
+ return nil
+}
+
+func mergeOverrides(into PartitionConfig, from RegionOverrides) PartitionConfig {
+ if from.Name != nil {
+ into.Name = *from.Name
+ }
+ if from.DnsSuffix != nil {
+ into.DnsSuffix = *from.DnsSuffix
+ }
+ if from.DualStackDnsSuffix != nil {
+ into.DualStackDnsSuffix = *from.DualStackDnsSuffix
+ }
+ if from.SupportsFIPS != nil {
+ into.SupportsFIPS = *from.SupportsFIPS
+ }
+ if from.SupportsDualStack != nil {
+ into.SupportsDualStack = *from.SupportsDualStack
+ }
+ return into
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition_test.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition_test.go
new file mode 100644
index 0000000000..94930bd84d
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partition_test.go
@@ -0,0 +1,102 @@
+package awsrulesfn
+
+import (
+ "testing"
+)
+
+var mockPartitions = []Partition{
+ {
+ ID: "aws",
+ RegionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws",
+ DnsSuffix: "amazonaws.com",
+ DualStackDnsSuffix: "api.aws",
+ SupportsFIPS: true,
+ SupportsDualStack: true,
+ },
+ Regions: map[string]RegionOverrides{
+ "af-south-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-west-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+ {
+ ID: "aws-cn",
+ RegionRegex: "^cn\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-cn",
+ DnsSuffix: "amazonaws.com.cn",
+ DualStackDnsSuffix: "api.amazonwebservices.com.cn",
+ SupportsFIPS: true,
+ SupportsDualStack: true,
+ },
+ Regions: map[string]RegionOverrides{
+ "aws-cn-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "cn-north-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "cn-northwest-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+}
+
+func TestGetPartition(t *testing.T) {
+ cases := map[string]struct {
+ Region string
+ PartitionName string
+ }{
+ "test region match aws": {
+ Region: "us-west-2", PartitionName: "aws",
+ },
+ "test region match aws-cn": {
+ Region: "aws-cn-global", PartitionName: "aws-cn",
+ },
+ "test invalid region; default partition": {
+ Region: "foo", PartitionName: "aws",
+ },
+ }
+
+ for n, c := range cases {
+ t.Run(n, func(t *testing.T) {
+
+ // monkey patch the partitions data structure
+ // thats used by the GetPartition func
+ partitions = mockPartitions
+
+ p := GetPartition(c.Region)
+ expected := c.PartitionName
+ actual := p.Name
+ if expected != actual {
+ t.Errorf("expected %v, got %v", expected, actual)
+ }
+ })
+ }
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go
new file mode 100644
index 0000000000..7ea49d4ea4
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/partitions.go
@@ -0,0 +1,343 @@
+// Code generated by endpoint/awsrulesfn/internal/partition. DO NOT EDIT.
+
+package awsrulesfn
+
+// GetPartition returns an AWS [Partition] for the region provided. If the
+// partition cannot be determined nil will be returned.
+func GetPartition(region string) *PartitionConfig {
+ return getPartition(partitions, region)
+}
+
+var partitions = []Partition{
+ {
+ ID: "aws",
+ RegionRegex: "^(us|eu|ap|sa|ca|me|af)\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws",
+ DnsSuffix: "amazonaws.com",
+ DualStackDnsSuffix: "api.aws",
+ SupportsFIPS: true,
+ SupportsDualStack: true,
+ },
+ Regions: map[string]RegionOverrides{
+ "af-south-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-northeast-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-northeast-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-northeast-3": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-south-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-south-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-southeast-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-southeast-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ap-southeast-3": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "aws-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "ca-central-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-central-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-central-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-north-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-south-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-south-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-west-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-west-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "eu-west-3": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "me-central-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "me-south-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "sa-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-east-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-west-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-west-2": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+ {
+ ID: "aws-cn",
+ RegionRegex: "^cn\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-cn",
+ DnsSuffix: "amazonaws.com.cn",
+ DualStackDnsSuffix: "api.amazonwebservices.com.cn",
+ SupportsFIPS: true,
+ SupportsDualStack: true,
+ },
+ Regions: map[string]RegionOverrides{
+ "aws-cn-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "cn-north-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "cn-northwest-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+ {
+ ID: "aws-us-gov",
+ RegionRegex: "^us\\-gov\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-us-gov",
+ DnsSuffix: "amazonaws.com",
+ DualStackDnsSuffix: "api.aws",
+ SupportsFIPS: true,
+ SupportsDualStack: true,
+ },
+ Regions: map[string]RegionOverrides{
+ "aws-us-gov-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-gov-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-gov-west-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+ {
+ ID: "aws-iso",
+ RegionRegex: "^us\\-iso\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-iso",
+ DnsSuffix: "c2s.ic.gov",
+ DualStackDnsSuffix: "c2s.ic.gov",
+ SupportsFIPS: true,
+ SupportsDualStack: false,
+ },
+ Regions: map[string]RegionOverrides{
+ "aws-iso-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-iso-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-iso-west-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+ {
+ ID: "aws-iso-b",
+ RegionRegex: "^us\\-isob\\-\\w+\\-\\d+$",
+ DefaultConfig: PartitionConfig{
+ Name: "aws-iso-b",
+ DnsSuffix: "sc2s.sgov.gov",
+ DualStackDnsSuffix: "sc2s.sgov.gov",
+ SupportsFIPS: true,
+ SupportsDualStack: false,
+ },
+ Regions: map[string]RegionOverrides{
+ "aws-iso-b-global": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ "us-isob-east-1": {
+ Name: nil,
+ DnsSuffix: nil,
+ DualStackDnsSuffix: nil,
+ SupportsFIPS: nil,
+ SupportsDualStack: nil,
+ },
+ },
+ },
+}
diff --git a/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/ya.make b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/ya.make
new file mode 100644
index 0000000000..8d079eae6c
--- /dev/null
+++ b/vendor/github.com/aws/aws-sdk-go-v2/internal/endpoints/awsrulesfn/ya.make
@@ -0,0 +1,23 @@
+GO_LIBRARY()
+
+LICENSE(Apache-2.0)
+
+SRCS(
+ arn.go
+ doc.go
+ host.go
+ partition.go
+ partitions.go
+)
+
+GO_TEST_SRCS(
+ arn_test.go
+ host_test.go
+ partition_test.go
+)
+
+END()
+
+RECURSE(
+ gotest
+)