Documentation ¶
Index ¶
- Constants
- type Sts
- func (c *Sts) AssumeRole(input *map[string]interface{}) (*map[string]interface{}, error)
- func (c *Sts) AssumeRoleRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})
- func (c *Sts) AssumeRoleWithContext(ctx aws.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)
Constants ¶
const ( ServiceName = "sts" // Name of service. EndpointsID = ServiceName // ID to lookup a service endpoint with. ServiceID = "sts" // ServiceID is a unique identifer of a specific service. )
Service information constants
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Sts ¶
Sts provides the API operation methods for making requests to sts. See this package's package overview docs for details on the service.
Sts methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.
func New ¶
func New(p client.ConfigProvider, cfgs ...*aws.Config) *Sts
New creates a new instance of the Sts client with a session. If additional configuration is needed for the client instance use the optional ksc.Config parameter to add your extra config.
Example:
// Create a Sts client from just a session. svc := sts.New(mySession) // Create a Sts client with additional configuration svc := sts.New(mySession, aws.NewConfig().WithRegion("us-west-2"))
func (*Sts) AssumeRole ¶
AssumeRole API operation for sts.
Returns awserr.Error for service API and SDK errors. Use runtime type assertions with awserr.Error's Code and Message methods to get detailed information about the error.
See the KSC API reference guide for sts's API operation AssumeRole for usage and error information. See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2015-11-01/AssumeRole
func (*Sts) AssumeRoleRequest ¶
func (c *Sts) AssumeRoleRequest(input *map[string]interface{}) (req *request.Request, output *map[string]interface{})
AssumeRoleRequest generates a "ksc/request.Request" representing the client's request for the AssumeRole operation. The "output" return value will be populated with the request's response once the request completes successfully.
Use "Send" method on the returned Request to send the API call to the service. the "output" return value is not valid until after Send returns without error.
See AssumeRole for more information on using the AssumeRole API call, and error handling.
This method is useful when you want to inject custom logic or configuration into the SDK's request lifecycle. Such as custom headers, or retry logic.
// Example sending a request using the AssumeRoleRequest method. req, resp := client.AssumeRoleRequest(params) err := req.Send() if err == nil { // resp is now filled fmt.Println(resp) }
See also, https://docs.aws.amazon.com/goto/WebAPI/sts-2015-11-01/AssumeRole
func (*Sts) AssumeRoleWithContext ¶
func (c *Sts) AssumeRoleWithContext(ctx aws.Context, input *map[string]interface{}, opts ...request.Option) (*map[string]interface{}, error)
AssumeRoleWithContext is the same as AssumeRole with the addition of the ability to pass a context and additional request options.
See AssumeRole for details on how to use this API operation.
The context must be non-nil and will be used for request cancellation. If the context is nil a panic will occur. In the future the SDK may create sub-contexts for http.Requests. See https://golang.org/pkg/context/ for more information on using Contexts.