Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aws: Add endpoint source property #1070

Merged
merged 2 commits into from
Jan 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .changes/next-release/aws-feature-1611348426115463000.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"ID": "aws-feature-1611348426115463000",
"SchemaVersion": 1,
"Module": "aws",
"Type": "feature",
"Description": "updates aws module to include endpoint source for aws Endpoint",
"MinVersion": "",
"AffectedModules": null
}
19 changes: 19 additions & 0 deletions aws/endpoints.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,27 @@ type Endpoint struct {
// The signing method that should be used for signing the requests to the
// endpoint.
SigningMethod string

// The source of the Endpoint. By default, this will be EndpointSourceServiceMetadata.
// When providing a custom endpoint, you should set the source as EndpointSourceCustom.
// If source is not provided when providing a custom endpoint, the SDK may not
// perform required host mutations correctly. Source should be used along with
// HostnameImmutable property as per the usage requirement.
Source EndpointSource
}

// EndpointSource is the endpoint source type.
type EndpointSource int

const (
// EndpointSourceServiceMetadata denotes service modeled endpoint metadata is used as Endpoint Source.
EndpointSourceServiceMetadata EndpointSource = iota

// EndpointSourceCustom denotes endpoint is a custom endpoint. This source should be used when
// user provides a custom endpoint to be used by the SDK.
EndpointSourceCustom
)

// EndpointNotFoundError is a sentinel error to indicate that the
// EndpointResolver implementation was unable to resolve an endpoint for the
// given service and region. Resolvers should use this to indicate that an API
Expand Down