rolesanywhere

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 12, 2023 License: Apache-2.0 Imports: 10 Imported by: 1

Documentation

Overview

Package rolesanywhere provides the client and types for making API requests to RolesAnywhere Service.

See https://docs.aws.amazon.com/goto/WebAPI/roles-anywhere-2018-05-10 for more information on this service.

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

Using the Client

To contact RolesAnywhere Service 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 RolesAnywhere Service client RolesAnywhere for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/rolesanywhere/#New

Index

Constants

View Source
const (

	// ErrCodeAccessDeniedException for service response error code
	// "AccessDeniedException".
	ErrCodeAccessDeniedException = "AccessDeniedException"

	// ErrCodeResourceNotFoundException for service response error code
	// "ResourceNotFoundException".
	ErrCodeResourceNotFoundException = "ResourceNotFoundException"

	// ErrCodeValidationException for service response error code
	// "ValidationException".
	ErrCodeValidationException = "ValidationException"
)
View Source
const (
	ServiceName = "Roles Anywhere" // Name of service.
	EndpointsID = "rolesanywhere"  // ID to lookup a service endpoint with.
	ServiceID   = "Roles Anywhere" // ServiceID is a unique identifier of a specific service.
)

Service information constants

Variables

This section is empty.

Functions

This section is empty.

Types

type AccessDeniedException

type AccessDeniedException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

func (*AccessDeniedException) Code

func (s *AccessDeniedException) Code() string

Code returns the exception type name.

func (*AccessDeniedException) Error

func (s *AccessDeniedException) Error() string

func (AccessDeniedException) GoString

func (s AccessDeniedException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*AccessDeniedException) Message

func (s *AccessDeniedException) Message() string

Message returns the exception's message.

func (*AccessDeniedException) OrigErr

func (s *AccessDeniedException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*AccessDeniedException) RequestID

func (s *AccessDeniedException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*AccessDeniedException) StatusCode

func (s *AccessDeniedException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (AccessDeniedException) String

func (s AccessDeniedException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type AssumedRoleUser

type AssumedRoleUser struct {
	Arn *string `locationName:"arn" type:"string"`

	AssumedRoleId *string `locationName:"assumedRoleId" type:"string"`
	// contains filtered or unexported fields
}

func (AssumedRoleUser) GoString

func (s AssumedRoleUser) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*AssumedRoleUser) SetArn

func (s *AssumedRoleUser) SetArn(v string) *AssumedRoleUser

SetArn sets the Arn field's value.

func (*AssumedRoleUser) SetAssumedRoleId

func (s *AssumedRoleUser) SetAssumedRoleId(v string) *AssumedRoleUser

SetAssumedRoleId sets the AssumedRoleId field's value.

func (AssumedRoleUser) String

func (s AssumedRoleUser) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type CreateSessionInput

type CreateSessionInput struct {
	Cert *string `location:"header" locationName:"x-amz-x509" type:"string"`

	DurationSeconds *int64 `locationName:"durationSeconds" min:"900" type:"integer"`

	InstanceProperties map[string]*string `locationName:"instanceProperties" type:"map"`

	// ProfileArn is a required field
	ProfileArn *string `location:"querystring" locationName:"profileArn" type:"string" required:"true"`

	// RoleArn is a required field
	RoleArn *string `location:"querystring" locationName:"roleArn" type:"string" required:"true"`

	SessionName *string `locationName:"sessionName" min:"2" type:"string"`

	TrustAnchorArn *string `location:"querystring" locationName:"trustAnchorArn" type:"string"`
	// contains filtered or unexported fields
}

func (CreateSessionInput) GoString

func (s CreateSessionInput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*CreateSessionInput) SetCert

SetCert sets the Cert field's value.

func (*CreateSessionInput) SetDurationSeconds

func (s *CreateSessionInput) SetDurationSeconds(v int64) *CreateSessionInput

SetDurationSeconds sets the DurationSeconds field's value.

func (*CreateSessionInput) SetInstanceProperties

func (s *CreateSessionInput) SetInstanceProperties(v map[string]*string) *CreateSessionInput

SetInstanceProperties sets the InstanceProperties field's value.

func (*CreateSessionInput) SetProfileArn

func (s *CreateSessionInput) SetProfileArn(v string) *CreateSessionInput

SetProfileArn sets the ProfileArn field's value.

func (*CreateSessionInput) SetRoleArn

func (s *CreateSessionInput) SetRoleArn(v string) *CreateSessionInput

SetRoleArn sets the RoleArn field's value.

func (*CreateSessionInput) SetSessionName

func (s *CreateSessionInput) SetSessionName(v string) *CreateSessionInput

SetSessionName sets the SessionName field's value.

func (*CreateSessionInput) SetTrustAnchorArn

func (s *CreateSessionInput) SetTrustAnchorArn(v string) *CreateSessionInput

SetTrustAnchorArn sets the TrustAnchorArn field's value.

func (CreateSessionInput) String

func (s CreateSessionInput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*CreateSessionInput) Validate

func (s *CreateSessionInput) Validate() error

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

type CreateSessionOutput

type CreateSessionOutput struct {
	CredentialSet []*CredentialResponse `locationName:"credentialSet" type:"list"`

	EnrollmentArn *string `locationName:"enrollmentArn" type:"string"`

	SubjectArn *string `locationName:"subjectArn" type:"string"`
	// contains filtered or unexported fields
}

func (CreateSessionOutput) GoString

func (s CreateSessionOutput) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*CreateSessionOutput) SetCredentialSet

func (s *CreateSessionOutput) SetCredentialSet(v []*CredentialResponse) *CreateSessionOutput

SetCredentialSet sets the CredentialSet field's value.

func (*CreateSessionOutput) SetEnrollmentArn

func (s *CreateSessionOutput) SetEnrollmentArn(v string) *CreateSessionOutput

SetEnrollmentArn sets the EnrollmentArn field's value.

func (*CreateSessionOutput) SetSubjectArn

func (s *CreateSessionOutput) SetSubjectArn(v string) *CreateSessionOutput

SetSubjectArn sets the SubjectArn field's value.

func (CreateSessionOutput) String

func (s CreateSessionOutput) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type CredentialResponse

type CredentialResponse struct {
	AssumedRoleUser *AssumedRoleUser `locationName:"assumedRoleUser" type:"structure"`

	Credentials *Credentials `locationName:"credentials" type:"structure"`

	PackedPolicySize *int64 `locationName:"packedPolicySize" type:"integer"`

	RoleArn *string `locationName:"roleArn" type:"string"`

	SourceIdentity *string `locationName:"sourceIdentity" type:"string"`
	// contains filtered or unexported fields
}

func (CredentialResponse) GoString

func (s CredentialResponse) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*CredentialResponse) SetAssumedRoleUser

func (s *CredentialResponse) SetAssumedRoleUser(v *AssumedRoleUser) *CredentialResponse

SetAssumedRoleUser sets the AssumedRoleUser field's value.

func (*CredentialResponse) SetCredentials

func (s *CredentialResponse) SetCredentials(v *Credentials) *CredentialResponse

SetCredentials sets the Credentials field's value.

func (*CredentialResponse) SetPackedPolicySize

func (s *CredentialResponse) SetPackedPolicySize(v int64) *CredentialResponse

SetPackedPolicySize sets the PackedPolicySize field's value.

func (*CredentialResponse) SetRoleArn

func (s *CredentialResponse) SetRoleArn(v string) *CredentialResponse

SetRoleArn sets the RoleArn field's value.

func (*CredentialResponse) SetSourceIdentity

func (s *CredentialResponse) SetSourceIdentity(v string) *CredentialResponse

SetSourceIdentity sets the SourceIdentity field's value.

func (CredentialResponse) String

func (s CredentialResponse) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type CredentialSummary

type CredentialSummary struct {
	Enabled *bool `locationName:"enabled" type:"boolean"`

	Failed *bool `locationName:"failed" type:"boolean"`

	Issuer *string `locationName:"issuer" type:"string"`

	SeenAt *time.Time `locationName:"seenAt" type:"timestamp" timestampFormat:"iso8601"`

	SerialNumber *string `locationName:"serialNumber" type:"string"`

	// X509Certificate is automatically base64 encoded/decoded by the SDK.
	X509Certificate []byte `locationName:"x509Certificate" type:"blob"`
	// contains filtered or unexported fields
}

func (CredentialSummary) GoString

func (s CredentialSummary) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*CredentialSummary) SetEnabled

func (s *CredentialSummary) SetEnabled(v bool) *CredentialSummary

SetEnabled sets the Enabled field's value.

func (*CredentialSummary) SetFailed

func (s *CredentialSummary) SetFailed(v bool) *CredentialSummary

SetFailed sets the Failed field's value.

func (*CredentialSummary) SetIssuer

func (s *CredentialSummary) SetIssuer(v string) *CredentialSummary

SetIssuer sets the Issuer field's value.

func (*CredentialSummary) SetSeenAt

func (s *CredentialSummary) SetSeenAt(v time.Time) *CredentialSummary

SetSeenAt sets the SeenAt field's value.

func (*CredentialSummary) SetSerialNumber

func (s *CredentialSummary) SetSerialNumber(v string) *CredentialSummary

SetSerialNumber sets the SerialNumber field's value.

func (*CredentialSummary) SetX509Certificate

func (s *CredentialSummary) SetX509Certificate(v []byte) *CredentialSummary

SetX509Certificate sets the X509Certificate field's value.

func (CredentialSummary) String

func (s CredentialSummary) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type Credentials

type Credentials struct {
	AccessKeyId *string `locationName:"accessKeyId" type:"string"`

	Expiration *string `locationName:"expiration" type:"string"`

	// SecretAccessKey is a sensitive parameter and its value will be
	// replaced with "sensitive" in string returned by Credentials's
	// String and GoString methods.
	SecretAccessKey *string `locationName:"secretAccessKey" type:"string" sensitive:"true"`

	SessionToken *string `locationName:"sessionToken" type:"string"`
	// contains filtered or unexported fields
}

func (Credentials) GoString

func (s Credentials) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*Credentials) SetAccessKeyId

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

SetAccessKeyId sets the AccessKeyId field's value.

func (*Credentials) SetExpiration

func (s *Credentials) SetExpiration(v string) *Credentials

SetExpiration sets the Expiration field's value.

func (*Credentials) SetSecretAccessKey

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

SetSecretAccessKey sets the SecretAccessKey field's value.

func (*Credentials) SetSessionToken

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

SetSessionToken sets the SessionToken field's value.

func (Credentials) String

func (s Credentials) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type ResourceNotFoundException

type ResourceNotFoundException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

func (*ResourceNotFoundException) Code

Code returns the exception type name.

func (*ResourceNotFoundException) Error

func (s *ResourceNotFoundException) Error() string

func (ResourceNotFoundException) GoString

func (s ResourceNotFoundException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*ResourceNotFoundException) Message

func (s *ResourceNotFoundException) Message() string

Message returns the exception's message.

func (*ResourceNotFoundException) OrigErr

func (s *ResourceNotFoundException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*ResourceNotFoundException) RequestID

func (s *ResourceNotFoundException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*ResourceNotFoundException) StatusCode

func (s *ResourceNotFoundException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (ResourceNotFoundException) String

func (s ResourceNotFoundException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

type RolesAnywhere

type RolesAnywhere struct {
	*client.Client
}

RolesAnywhere provides the API operation methods for making requests to RolesAnywhere Service. See this package's package overview docs for details on the service.

RolesAnywhere 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) *RolesAnywhere

New creates a new instance of the RolesAnywhere 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 RolesAnywhere client from just a session.
svc := rolesanywhere.New(mySession)

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

func (*RolesAnywhere) CreateSession

func (c *RolesAnywhere) CreateSession(input *CreateSessionInput) (*CreateSessionOutput, error)

CreateSession API operation for RolesAnywhere Service.

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 RolesAnywhere Service's API operation CreateSession for usage and error information.

Returned Error Types:

  • ValidationException

  • ResourceNotFoundException

  • AccessDeniedException

See also, https://docs.aws.amazon.com/goto/WebAPI/roles-anywhere-2018-05-10/CreateSession

func (*RolesAnywhere) CreateSessionRequest

func (c *RolesAnywhere) CreateSessionRequest(input *CreateSessionInput) (req *request.Request, output *CreateSessionOutput)

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

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

See also, https://docs.aws.amazon.com/goto/WebAPI/roles-anywhere-2018-05-10/CreateSession

func (*RolesAnywhere) CreateSessionWithContext

func (c *RolesAnywhere) CreateSessionWithContext(ctx aws.Context, input *CreateSessionInput, opts ...request.Option) (*CreateSessionOutput, error)

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

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

type ValidationException

type ValidationException struct {
	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`

	Message_ *string `locationName:"message" type:"string"`
	// contains filtered or unexported fields
}

func (*ValidationException) Code

func (s *ValidationException) Code() string

Code returns the exception type name.

func (*ValidationException) Error

func (s *ValidationException) Error() string

func (ValidationException) GoString

func (s ValidationException) GoString() string

GoString returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

func (*ValidationException) Message

func (s *ValidationException) Message() string

Message returns the exception's message.

func (*ValidationException) OrigErr

func (s *ValidationException) OrigErr() error

OrigErr always returns nil, satisfies awserr.Error interface.

func (*ValidationException) RequestID

func (s *ValidationException) RequestID() string

RequestID returns the service's response RequestID for request.

func (*ValidationException) StatusCode

func (s *ValidationException) StatusCode() int

Status code returns the HTTP status code for the request's response error.

func (ValidationException) String

func (s ValidationException) String() string

String returns the string representation.

API parameter values that are decorated as "sensitive" in the API will not be included in the string output. The member name will be present, but the value will be replaced with "sensitive".

Directories

Path Synopsis
Package rolesanywhereiface provides an interface to enable mocking the RolesAnywhere Service service client for testing your code.
Package rolesanywhereiface provides an interface to enable mocking the RolesAnywhere Service service client for testing your code.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL