aws-sdk-go: github.com/aws/aws-sdk-go/service/sso Index | Files | Directories

package sso

import "github.com/aws/aws-sdk-go/service/sso"

Package sso provides the client and types for making API requests to AWS Single Sign-On.

AWS Single Sign-On Portal is a web service that makes it easy for you to assign user access to AWS SSO resources such as the user portal. Users can get AWS account applications and roles assigned to them and get federated into the application.

For general information about AWS SSO, see What is AWS Single Sign-On? (https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html) in the AWS SSO User Guide.

This API reference guide describes the AWS SSO Portal operations that you can call programatically and includes detailed information on data types and errors.

AWS provides SDKs that consist of libraries and sample code for various programming languages and platforms, such as Java, Ruby, .Net, iOS, or Android. The SDKs provide a convenient way to create programmatic access to AWS SSO and other AWS services. For more information about the AWS SDKs, including how to download and install them, see Tools for Amazon Web Services (http://aws.amazon.com/tools/).

See https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10 for more information on this service.

See sso package documentation for more information. https://docs.aws.amazon.com/sdk-for-go/api/service/sso/

Using the Client

To contact AWS Single Sign-On with the SDK use the New function to create a new service client. With that client you can make API requests to the service. These clients are safe to use concurrently.

See the SDK's documentation for more information on how to use the SDK. https://docs.aws.amazon.com/sdk-for-go/api/

See aws.Config documentation for more information on configuring SDK clients. https://docs.aws.amazon.com/sdk-for-go/api/aws/#Config

See the AWS Single Sign-On client SSO for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/sso/#New

Index

Package Files

api.go doc.go errors.go service.go

Constants

const (

    // ErrCodeInvalidRequestException for service response error code
    // "InvalidRequestException".
    //
    // Indicates that a problem occurred with the input to the request. For example,
    // a required parameter might be missing or out of range.
    ErrCodeInvalidRequestException = "InvalidRequestException"

    // ErrCodeResourceNotFoundException for service response error code
    // "ResourceNotFoundException".
    //
    // The specified resource doesn't exist.
    ErrCodeResourceNotFoundException = "ResourceNotFoundException"

    // ErrCodeTooManyRequestsException for service response error code
    // "TooManyRequestsException".
    //
    // Indicates that the request is being made too frequently and is more than
    // what the server can handle.
    ErrCodeTooManyRequestsException = "TooManyRequestsException"

    // ErrCodeUnauthorizedException for service response error code
    // "UnauthorizedException".
    //
    // Indicates that the request is not authorized. This can happen due to an invalid
    // access token in the request.
    ErrCodeUnauthorizedException = "UnauthorizedException"
)
const (
    ServiceName = "SSO"        // Name of service.
    EndpointsID = "portal.sso" // ID to lookup a service endpoint with.
    ServiceID   = "SSO"        // ServiceID is a unique identifier of a specific service.
)

Service information constants

type AccountInfo Uses

type AccountInfo struct {

    // The identifier of the AWS account that is assigned to the user.
    AccountId *string `locationName:"accountId" type:"string"`

    // The display name of the AWS account that is assigned to the user.
    AccountName *string `locationName:"accountName" type:"string"`

    // The email address of the AWS account that is assigned to the user.
    EmailAddress *string `locationName:"emailAddress" min:"1" type:"string"`
    // contains filtered or unexported fields
}

Provides information about your AWS account.

func (AccountInfo) GoString Uses

func (s AccountInfo) GoString() string

GoString returns the string representation

func (*AccountInfo) SetAccountId Uses

func (s *AccountInfo) SetAccountId(v string) *AccountInfo

SetAccountId sets the AccountId field's value.

func (*AccountInfo) SetAccountName Uses

func (s *AccountInfo) SetAccountName(v string) *AccountInfo

SetAccountName sets the AccountName field's value.

func (*AccountInfo) SetEmailAddress Uses

func (s *AccountInfo) SetEmailAddress(v string) *AccountInfo

SetEmailAddress sets the EmailAddress field's value.

func (AccountInfo) String Uses

func (s AccountInfo) String() string

String returns the string representation

type GetRoleCredentialsInput Uses

type GetRoleCredentialsInput struct {

    // The token issued by the CreateToken API call. For more information, see CreateToken
    // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
    // in the AWS SSO OIDC API Reference Guide.
    //
    // AccessToken is a required field
    AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`

    // The identifier for the AWS account that is assigned to the user.
    //
    // AccountId is a required field
    AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"`

    // The friendly name of the role that is assigned to the user.
    //
    // RoleName is a required field
    RoleName *string `location:"querystring" locationName:"role_name" type:"string" required:"true"`
    // contains filtered or unexported fields
}

func (GetRoleCredentialsInput) GoString Uses

func (s GetRoleCredentialsInput) GoString() string

GoString returns the string representation

func (*GetRoleCredentialsInput) SetAccessToken Uses

func (s *GetRoleCredentialsInput) SetAccessToken(v string) *GetRoleCredentialsInput

SetAccessToken sets the AccessToken field's value.

func (*GetRoleCredentialsInput) SetAccountId Uses

func (s *GetRoleCredentialsInput) SetAccountId(v string) *GetRoleCredentialsInput

SetAccountId sets the AccountId field's value.

func (*GetRoleCredentialsInput) SetRoleName Uses

func (s *GetRoleCredentialsInput) SetRoleName(v string) *GetRoleCredentialsInput

SetRoleName sets the RoleName field's value.

func (GetRoleCredentialsInput) String Uses

func (s GetRoleCredentialsInput) String() string

String returns the string representation

func (*GetRoleCredentialsInput) Validate Uses

func (s *GetRoleCredentialsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type GetRoleCredentialsOutput Uses

type GetRoleCredentialsOutput struct {

    // The credentials for the role that is assigned to the user.
    RoleCredentials *RoleCredentials `locationName:"roleCredentials" type:"structure"`
    // contains filtered or unexported fields
}

func (GetRoleCredentialsOutput) GoString Uses

func (s GetRoleCredentialsOutput) GoString() string

GoString returns the string representation

func (*GetRoleCredentialsOutput) SetRoleCredentials Uses

func (s *GetRoleCredentialsOutput) SetRoleCredentials(v *RoleCredentials) *GetRoleCredentialsOutput

SetRoleCredentials sets the RoleCredentials field's value.

func (GetRoleCredentialsOutput) String Uses

func (s GetRoleCredentialsOutput) String() string

String returns the string representation

type ListAccountRolesInput Uses

type ListAccountRolesInput struct {

    // The token issued by the CreateToken API call. For more information, see CreateToken
    // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
    // in the AWS SSO OIDC API Reference Guide.
    //
    // AccessToken is a required field
    AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`

    // The identifier for the AWS account that is assigned to the user.
    //
    // AccountId is a required field
    AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"`

    // The number of items that clients can request per page.
    MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"`

    // The page token from the previous response output when you request subsequent
    // pages.
    NextToken *string `location:"querystring" locationName:"next_token" type:"string"`
    // contains filtered or unexported fields
}

func (ListAccountRolesInput) GoString Uses

func (s ListAccountRolesInput) GoString() string

GoString returns the string representation

func (*ListAccountRolesInput) SetAccessToken Uses

func (s *ListAccountRolesInput) SetAccessToken(v string) *ListAccountRolesInput

SetAccessToken sets the AccessToken field's value.

func (*ListAccountRolesInput) SetAccountId Uses

func (s *ListAccountRolesInput) SetAccountId(v string) *ListAccountRolesInput

SetAccountId sets the AccountId field's value.

func (*ListAccountRolesInput) SetMaxResults Uses

func (s *ListAccountRolesInput) SetMaxResults(v int64) *ListAccountRolesInput

SetMaxResults sets the MaxResults field's value.

func (*ListAccountRolesInput) SetNextToken Uses

func (s *ListAccountRolesInput) SetNextToken(v string) *ListAccountRolesInput

SetNextToken sets the NextToken field's value.

func (ListAccountRolesInput) String Uses

func (s ListAccountRolesInput) String() string

String returns the string representation

func (*ListAccountRolesInput) Validate Uses

func (s *ListAccountRolesInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListAccountRolesOutput Uses

type ListAccountRolesOutput struct {

    // The page token client that is used to retrieve the list of accounts.
    NextToken *string `locationName:"nextToken" type:"string"`

    // A paginated response with the list of roles and the next token if more results
    // are available.
    RoleList []*RoleInfo `locationName:"roleList" type:"list"`
    // contains filtered or unexported fields
}

func (ListAccountRolesOutput) GoString Uses

func (s ListAccountRolesOutput) GoString() string

GoString returns the string representation

func (*ListAccountRolesOutput) SetNextToken Uses

func (s *ListAccountRolesOutput) SetNextToken(v string) *ListAccountRolesOutput

SetNextToken sets the NextToken field's value.

func (*ListAccountRolesOutput) SetRoleList Uses

func (s *ListAccountRolesOutput) SetRoleList(v []*RoleInfo) *ListAccountRolesOutput

SetRoleList sets the RoleList field's value.

func (ListAccountRolesOutput) String Uses

func (s ListAccountRolesOutput) String() string

String returns the string representation

type ListAccountsInput Uses

type ListAccountsInput struct {

    // The token issued by the CreateToken API call. For more information, see CreateToken
    // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
    // in the AWS SSO OIDC API Reference Guide.
    //
    // AccessToken is a required field
    AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`

    // This is the number of items clients can request per page.
    MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"`

    // (Optional) When requesting subsequent pages, this is the page token from
    // the previous response output.
    NextToken *string `location:"querystring" locationName:"next_token" type:"string"`
    // contains filtered or unexported fields
}

func (ListAccountsInput) GoString Uses

func (s ListAccountsInput) GoString() string

GoString returns the string representation

func (*ListAccountsInput) SetAccessToken Uses

func (s *ListAccountsInput) SetAccessToken(v string) *ListAccountsInput

SetAccessToken sets the AccessToken field's value.

func (*ListAccountsInput) SetMaxResults Uses

func (s *ListAccountsInput) SetMaxResults(v int64) *ListAccountsInput

SetMaxResults sets the MaxResults field's value.

func (*ListAccountsInput) SetNextToken Uses

func (s *ListAccountsInput) SetNextToken(v string) *ListAccountsInput

SetNextToken sets the NextToken field's value.

func (ListAccountsInput) String Uses

func (s ListAccountsInput) String() string

String returns the string representation

func (*ListAccountsInput) Validate Uses

func (s *ListAccountsInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type ListAccountsOutput Uses

type ListAccountsOutput struct {

    // A paginated response with the list of account information and the next token
    // if more results are available.
    AccountList []*AccountInfo `locationName:"accountList" type:"list"`

    // The page token client that is used to retrieve the list of accounts.
    NextToken *string `locationName:"nextToken" type:"string"`
    // contains filtered or unexported fields
}

func (ListAccountsOutput) GoString Uses

func (s ListAccountsOutput) GoString() string

GoString returns the string representation

func (*ListAccountsOutput) SetAccountList Uses

func (s *ListAccountsOutput) SetAccountList(v []*AccountInfo) *ListAccountsOutput

SetAccountList sets the AccountList field's value.

func (*ListAccountsOutput) SetNextToken Uses

func (s *ListAccountsOutput) SetNextToken(v string) *ListAccountsOutput

SetNextToken sets the NextToken field's value.

func (ListAccountsOutput) String Uses

func (s ListAccountsOutput) String() string

String returns the string representation

type LogoutInput Uses

type LogoutInput struct {

    // The token issued by the CreateToken API call. For more information, see CreateToken
    // (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
    // in the AWS SSO OIDC API Reference Guide.
    //
    // AccessToken is a required field
    AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
    // contains filtered or unexported fields
}

func (LogoutInput) GoString Uses

func (s LogoutInput) GoString() string

GoString returns the string representation

func (*LogoutInput) SetAccessToken Uses

func (s *LogoutInput) SetAccessToken(v string) *LogoutInput

SetAccessToken sets the AccessToken field's value.

func (LogoutInput) String Uses

func (s LogoutInput) String() string

String returns the string representation

func (*LogoutInput) Validate Uses

func (s *LogoutInput) Validate() error

Validate inspects the fields of the type to determine if they are valid.

type LogoutOutput Uses

type LogoutOutput struct {
    // contains filtered or unexported fields
}

func (LogoutOutput) GoString Uses

func (s LogoutOutput) GoString() string

GoString returns the string representation

func (LogoutOutput) String Uses

func (s LogoutOutput) String() string

String returns the string representation

type RoleCredentials Uses

type RoleCredentials struct {

    // The identifier used for the temporary security credentials. For more information,
    // see Using Temporary Security Credentials to Request Access to AWS Resources
    // (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
    // in the AWS IAM User Guide.
    AccessKeyId *string `locationName:"accessKeyId" type:"string"`

    // The date on which temporary security credentials expire.
    Expiration *int64 `locationName:"expiration" type:"long"`

    // The key that is used to sign the request. For more information, see Using
    // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
    // in the AWS IAM User Guide.
    SecretAccessKey *string `locationName:"secretAccessKey" type:"string" sensitive:"true"`

    // The token used for temporary credentials. For more information, see Using
    // Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
    // in the AWS IAM User Guide.
    SessionToken *string `locationName:"sessionToken" type:"string" sensitive:"true"`
    // contains filtered or unexported fields
}

Provides information about the role credentials that are assigned to the user.

func (RoleCredentials) GoString Uses

func (s RoleCredentials) GoString() string

GoString returns the string representation

func (*RoleCredentials) SetAccessKeyId Uses

func (s *RoleCredentials) SetAccessKeyId(v string) *RoleCredentials

SetAccessKeyId sets the AccessKeyId field's value.

func (*RoleCredentials) SetExpiration Uses

func (s *RoleCredentials) SetExpiration(v int64) *RoleCredentials

SetExpiration sets the Expiration field's value.

func (*RoleCredentials) SetSecretAccessKey Uses

func (s *RoleCredentials) SetSecretAccessKey(v string) *RoleCredentials

SetSecretAccessKey sets the SecretAccessKey field's value.

func (*RoleCredentials) SetSessionToken Uses

func (s *RoleCredentials) SetSessionToken(v string) *RoleCredentials

SetSessionToken sets the SessionToken field's value.

func (RoleCredentials) String Uses

func (s RoleCredentials) String() string

String returns the string representation

type RoleInfo Uses

type RoleInfo struct {

    // The identifier of the AWS account assigned to the user.
    AccountId *string `locationName:"accountId" type:"string"`

    // The friendly name of the role that is assigned to the user.
    RoleName *string `locationName:"roleName" type:"string"`
    // contains filtered or unexported fields
}

Provides information about the role that is assigned to the user.

func (RoleInfo) GoString Uses

func (s RoleInfo) GoString() string

GoString returns the string representation

func (*RoleInfo) SetAccountId Uses

func (s *RoleInfo) SetAccountId(v string) *RoleInfo

SetAccountId sets the AccountId field's value.

func (*RoleInfo) SetRoleName Uses

func (s *RoleInfo) SetRoleName(v string) *RoleInfo

SetRoleName sets the RoleName field's value.

func (RoleInfo) String Uses

func (s RoleInfo) String() string

String returns the string representation

type SSO Uses

type SSO struct {
    *client.Client
}

SSO provides the API operation methods for making requests to AWS Single Sign-On. See this package's package overview docs for details on the service.

SSO methods are safe to use concurrently. It is not safe to modify mutate any of the struct's properties though.

func New Uses

func New(p client.ConfigProvider, cfgs ...*aws.Config) *SSO

New creates a new instance of the SSO client with a session. If additional configuration is needed for the client instance use the optional aws.Config parameter to add your extra config.

Example:

mySession := session.Must(session.NewSession())

// Create a SSO client from just a session.
svc := sso.New(mySession)

// Create a SSO client with additional configuration
svc := sso.New(mySession, aws.NewConfig().WithRegion("us-west-2"))

func (*SSO) GetRoleCredentials Uses

func (c *SSO) GetRoleCredentials(input *GetRoleCredentialsInput) (*GetRoleCredentialsOutput, error)

GetRoleCredentials API operation for AWS Single Sign-On.

Returns the STS short-term credentials for a given role name that is assigned to the user.

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 AWS API reference guide for AWS Single Sign-On's API operation GetRoleCredentials for usage and error information.

Returned Error Codes:

* ErrCodeInvalidRequestException "InvalidRequestException"
Indicates that a problem occurred with the input to the request. For example,
a required parameter might be missing or out of range.

* ErrCodeUnauthorizedException "UnauthorizedException"
Indicates that the request is not authorized. This can happen due to an invalid
access token in the request.

* ErrCodeTooManyRequestsException "TooManyRequestsException"
Indicates that the request is being made too frequently and is more than
what the server can handle.

* ErrCodeResourceNotFoundException "ResourceNotFoundException"
The specified resource doesn't exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials

func (*SSO) GetRoleCredentialsRequest Uses

func (c *SSO) GetRoleCredentialsRequest(input *GetRoleCredentialsInput) (req *request.Request, output *GetRoleCredentialsOutput)

GetRoleCredentialsRequest generates a "aws/request.Request" representing the client's request for the GetRoleCredentials 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 GetRoleCredentials for more information on using the GetRoleCredentials 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 GetRoleCredentialsRequest method.
req, resp := client.GetRoleCredentialsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials

func (*SSO) GetRoleCredentialsWithContext Uses

func (c *SSO) GetRoleCredentialsWithContext(ctx aws.Context, input *GetRoleCredentialsInput, opts ...request.Option) (*GetRoleCredentialsOutput, error)

GetRoleCredentialsWithContext is the same as GetRoleCredentials with the addition of the ability to pass a context and additional request options.

See GetRoleCredentials 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.

func (*SSO) ListAccountRoles Uses

func (c *SSO) ListAccountRoles(input *ListAccountRolesInput) (*ListAccountRolesOutput, error)

ListAccountRoles API operation for AWS Single Sign-On.

Lists all roles that are assigned to the user for a given AWS account.

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 AWS API reference guide for AWS Single Sign-On's API operation ListAccountRoles for usage and error information.

Returned Error Codes:

* ErrCodeInvalidRequestException "InvalidRequestException"
Indicates that a problem occurred with the input to the request. For example,
a required parameter might be missing or out of range.

* ErrCodeUnauthorizedException "UnauthorizedException"
Indicates that the request is not authorized. This can happen due to an invalid
access token in the request.

* ErrCodeTooManyRequestsException "TooManyRequestsException"
Indicates that the request is being made too frequently and is more than
what the server can handle.

* ErrCodeResourceNotFoundException "ResourceNotFoundException"
The specified resource doesn't exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles

func (*SSO) ListAccountRolesPages Uses

func (c *SSO) ListAccountRolesPages(input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool) error

ListAccountRolesPages iterates over the pages of a ListAccountRoles operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListAccountRoles method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListAccountRoles operation.
pageNum := 0
err := client.ListAccountRolesPages(params,
    func(page *sso.ListAccountRolesOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*SSO) ListAccountRolesPagesWithContext Uses

func (c *SSO) ListAccountRolesPagesWithContext(ctx aws.Context, input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool, opts ...request.Option) error

ListAccountRolesPagesWithContext same as ListAccountRolesPages except it takes a Context and allows setting request options on the pages.

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.

func (*SSO) ListAccountRolesRequest Uses

func (c *SSO) ListAccountRolesRequest(input *ListAccountRolesInput) (req *request.Request, output *ListAccountRolesOutput)

ListAccountRolesRequest generates a "aws/request.Request" representing the client's request for the ListAccountRoles 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 ListAccountRoles for more information on using the ListAccountRoles 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 ListAccountRolesRequest method.
req, resp := client.ListAccountRolesRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles

func (*SSO) ListAccountRolesWithContext Uses

func (c *SSO) ListAccountRolesWithContext(ctx aws.Context, input *ListAccountRolesInput, opts ...request.Option) (*ListAccountRolesOutput, error)

ListAccountRolesWithContext is the same as ListAccountRoles with the addition of the ability to pass a context and additional request options.

See ListAccountRoles 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.

func (*SSO) ListAccounts Uses

func (c *SSO) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error)

ListAccounts API operation for AWS Single Sign-On.

Lists all AWS accounts assigned to the user. These AWS accounts are assigned by the administrator of the account. For more information, see Assign User Access (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers) in the AWS SSO User Guide. This operation returns a paginated response.

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 AWS API reference guide for AWS Single Sign-On's API operation ListAccounts for usage and error information.

Returned Error Codes:

* ErrCodeInvalidRequestException "InvalidRequestException"
Indicates that a problem occurred with the input to the request. For example,
a required parameter might be missing or out of range.

* ErrCodeUnauthorizedException "UnauthorizedException"
Indicates that the request is not authorized. This can happen due to an invalid
access token in the request.

* ErrCodeTooManyRequestsException "TooManyRequestsException"
Indicates that the request is being made too frequently and is more than
what the server can handle.

* ErrCodeResourceNotFoundException "ResourceNotFoundException"
The specified resource doesn't exist.

See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts

func (*SSO) ListAccountsPages Uses

func (c *SSO) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error

ListAccountsPages iterates over the pages of a ListAccounts operation, calling the "fn" function with the response data for each page. To stop iterating, return false from the fn function.

See ListAccounts method for more information on how to use this operation.

Note: This operation can generate multiple requests to a service.

// Example iterating over at most 3 pages of a ListAccounts operation.
pageNum := 0
err := client.ListAccountsPages(params,
    func(page *sso.ListAccountsOutput, lastPage bool) bool {
        pageNum++
        fmt.Println(page)
        return pageNum <= 3
    })

func (*SSO) ListAccountsPagesWithContext Uses

func (c *SSO) ListAccountsPagesWithContext(ctx aws.Context, input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool, opts ...request.Option) error

ListAccountsPagesWithContext same as ListAccountsPages except it takes a Context and allows setting request options on the pages.

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.

func (*SSO) ListAccountsRequest Uses

func (c *SSO) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput)

ListAccountsRequest generates a "aws/request.Request" representing the client's request for the ListAccounts 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 ListAccounts for more information on using the ListAccounts 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 ListAccountsRequest method.
req, resp := client.ListAccountsRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts

func (*SSO) ListAccountsWithContext Uses

func (c *SSO) ListAccountsWithContext(ctx aws.Context, input *ListAccountsInput, opts ...request.Option) (*ListAccountsOutput, error)

ListAccountsWithContext is the same as ListAccounts with the addition of the ability to pass a context and additional request options.

See ListAccounts 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.

func (*SSO) Logout Uses

func (c *SSO) Logout(input *LogoutInput) (*LogoutOutput, error)

Logout API operation for AWS Single Sign-On.

Removes the client- and server-side session that is associated with the user.

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 AWS API reference guide for AWS Single Sign-On's API operation Logout for usage and error information.

Returned Error Codes:

* ErrCodeInvalidRequestException "InvalidRequestException"
Indicates that a problem occurred with the input to the request. For example,
a required parameter might be missing or out of range.

* ErrCodeUnauthorizedException "UnauthorizedException"
Indicates that the request is not authorized. This can happen due to an invalid
access token in the request.

* ErrCodeTooManyRequestsException "TooManyRequestsException"
Indicates that the request is being made too frequently and is more than
what the server can handle.

See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout

func (*SSO) LogoutRequest Uses

func (c *SSO) LogoutRequest(input *LogoutInput) (req *request.Request, output *LogoutOutput)

LogoutRequest generates a "aws/request.Request" representing the client's request for the Logout 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 Logout for more information on using the Logout 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 LogoutRequest method.
req, resp := client.LogoutRequest(params)

err := req.Send()
if err == nil { // resp is now filled
    fmt.Println(resp)
}

See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout

func (*SSO) LogoutWithContext Uses

func (c *SSO) LogoutWithContext(ctx aws.Context, input *LogoutInput, opts ...request.Option) (*LogoutOutput, error)

LogoutWithContext is the same as Logout with the addition of the ability to pass a context and additional request options.

See Logout 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.

Directories

PathSynopsis
ssoifacePackage ssoiface provides an interface to enable mocking the AWS Single Sign-On service client for testing your code.

Package sso imports 9 packages (graph) and is imported by 3 packages. Updated 2019-12-15. Refresh now. Tools for package owners.