migrationhubconfig

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2019 License: Apache-2.0 Imports: 6 Imported by: 7

Documentation

Overview

Package migrationhubconfig provides the client and types for making API requests to AWS Migration Hub Config.

The AWS Migration Hub home region APIs are available specifically for working with your Migration Hub home region. You can use these APIs to determine a home region, as well as to create and work with controls that describe the home region.

You can use these APIs within your home region only. If you call these APIs from outside your home region, your calls are rejected, except for the ability to register your agents and connectors.

You must call GetHomeRegion at least once before you call any other AWS Application Discovery Service and AWS Migration Hub APIs, to obtain the account's Migration Hub home region.

The StartDataCollection API call in AWS Application Discovery Service allows your agents and connectors to begin collecting data that flows directly into the home region, and it will prevent you from enabling data collection information to be sent outside the home region.

For specific API usage, see the sections that follow in this AWS Migration Hub Home Region API reference.

The Migration Hub Home Region APIs do not support AWS Organizations.

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

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

Using the Client

To use AWS Migration Hub Config 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 Migration Hub Config client for more information on creating client for this service. https://docs.aws.amazon.com/sdk-for-go/api/service/migrationhubconfig/#New

Index

Constants

View Source
const (
	ServiceName = "AWS Migration Hub Config" // Service's name
	ServiceID   = "MigrationHubConfig"       // Service's identifier
	EndpointsID = "migrationhub-config"      // Service's Endpoint identifier
)
View Source
const (

	// ErrCodeAccessDeniedException for service response error code
	// "AccessDeniedException".
	//
	// You do not have sufficient access to perform this action.
	ErrCodeAccessDeniedException = "AccessDeniedException"

	// ErrCodeDryRunOperation for service response error code
	// "DryRunOperation".
	//
	// Exception raised to indicate that authorization of an action was successful,
	// when the DryRun flag is set to true.
	ErrCodeDryRunOperation = "DryRunOperation"

	// ErrCodeInternalServerError for service response error code
	// "InternalServerError".
	//
	// Exception raised when an internal, configuration, or dependency error is
	// encountered.
	ErrCodeInternalServerError = "InternalServerError"

	// ErrCodeInvalidInputException for service response error code
	// "InvalidInputException".
	//
	// Exception raised when the provided input violates a policy constraint or
	// is entered in the wrong format or data type.
	ErrCodeInvalidInputException = "InvalidInputException"

	// ErrCodeServiceUnavailableException for service response error code
	// "ServiceUnavailableException".
	//
	// Exception raised when a request fails due to temporary unavailability of
	// the service.
	ErrCodeServiceUnavailableException = "ServiceUnavailableException"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*aws.Client
}

Client provides the API operation methods for making requests to AWS Migration Hub Config. See this package's package overview docs for details on the service.

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

func New

func New(config aws.Config) *Client

New creates a new instance of the client from the provided Config.

Example:

// Create a client from just a config.
svc := migrationhubconfig.New(myConfig)

func (*Client) CreateHomeRegionControlRequest

func (c *Client) CreateHomeRegionControlRequest(input *CreateHomeRegionControlInput) CreateHomeRegionControlRequest

CreateHomeRegionControlRequest returns a request value for making API operation for AWS Migration Hub Config.

This API sets up the home region for the calling account only.

// Example sending a request using CreateHomeRegionControlRequest.
req := client.CreateHomeRegionControlRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/migrationhub-config-2019-06-30/CreateHomeRegionControl

func (*Client) DescribeHomeRegionControlsRequest

func (c *Client) DescribeHomeRegionControlsRequest(input *DescribeHomeRegionControlsInput) DescribeHomeRegionControlsRequest

DescribeHomeRegionControlsRequest returns a request value for making API operation for AWS Migration Hub Config.

This API permits filtering on the ControlId, HomeRegion, and RegionControlScope fields.

// Example sending a request using DescribeHomeRegionControlsRequest.
req := client.DescribeHomeRegionControlsRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/migrationhub-config-2019-06-30/DescribeHomeRegionControls

func (*Client) GetHomeRegionRequest

func (c *Client) GetHomeRegionRequest(input *GetHomeRegionInput) GetHomeRegionRequest

GetHomeRegionRequest returns a request value for making API operation for AWS Migration Hub Config.

Returns the calling account’s home region, if configured. This API is used by other AWS services to determine the regional endpoint for calling AWS Application Discovery Service and Migration Hub. You must call GetHomeRegion at least once before you call any other AWS Application Discovery Service and AWS Migration Hub APIs, to obtain the account's Migration Hub home region.

// Example sending a request using GetHomeRegionRequest.
req := client.GetHomeRegionRequest(params)
resp, err := req.Send(context.TODO())
if err == nil {
    fmt.Println(resp)
}

Please also see https://docs.aws.amazon.com/goto/WebAPI/migrationhub-config-2019-06-30/GetHomeRegion

type CreateHomeRegionControlInput

type CreateHomeRegionControlInput struct {

	// Optional Boolean flag to indicate whether any effect should take place. It
	// tests whether the caller has permission to make the call.
	DryRun *bool `type:"boolean"`

	// The name of the home region of the calling account.
	//
	// HomeRegion is a required field
	HomeRegion *string `min:"1" type:"string" required:"true"`

	// The account for which this command sets up a home region control. The Target
	// is always of type ACCOUNT.
	//
	// Target is a required field
	Target *Target `type:"structure" required:"true"`
	// contains filtered or unexported fields
}

func (CreateHomeRegionControlInput) String

String returns the string representation

func (*CreateHomeRegionControlInput) Validate

func (s *CreateHomeRegionControlInput) Validate() error

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

type CreateHomeRegionControlOutput

type CreateHomeRegionControlOutput struct {

	// This object is the HomeRegionControl object that's returned by a successful
	// call to CreateHomeRegionControl.
	HomeRegionControl *HomeRegionControl `type:"structure"`
	// contains filtered or unexported fields
}

func (CreateHomeRegionControlOutput) String

String returns the string representation

type CreateHomeRegionControlRequest

type CreateHomeRegionControlRequest struct {
	*aws.Request
	Input *CreateHomeRegionControlInput
	Copy  func(*CreateHomeRegionControlInput) CreateHomeRegionControlRequest
}

CreateHomeRegionControlRequest is the request type for the CreateHomeRegionControl API operation.

func (CreateHomeRegionControlRequest) Send

Send marshals and sends the CreateHomeRegionControl API request.

type CreateHomeRegionControlResponse

type CreateHomeRegionControlResponse struct {
	*CreateHomeRegionControlOutput
	// contains filtered or unexported fields
}

CreateHomeRegionControlResponse is the response type for the CreateHomeRegionControl API operation.

func (*CreateHomeRegionControlResponse) SDKResponseMetdata

func (r *CreateHomeRegionControlResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the CreateHomeRegionControl request.

type DescribeHomeRegionControlsInput

type DescribeHomeRegionControlsInput struct {

	// The ControlID is a unique identifier string of your HomeRegionControl object.
	ControlId *string `min:"1" type:"string"`

	// The name of the home region you'd like to view.
	HomeRegion *string `min:"1" type:"string"`

	// The maximum number of filtering results to display per page.
	MaxResults *int64 `min:"1" type:"integer"`

	// If a NextToken was returned by a previous call, more results are available.
	// To retrieve the next page of results, make the call again using the returned
	// token in NextToken.
	NextToken *string `type:"string"`

	// The target parameter specifies the identifier to which the home region is
	// applied, which is always of type ACCOUNT. It applies the home region to the
	// current ACCOUNT.
	Target *Target `type:"structure"`
	// contains filtered or unexported fields
}

func (DescribeHomeRegionControlsInput) String

String returns the string representation

func (*DescribeHomeRegionControlsInput) Validate

func (s *DescribeHomeRegionControlsInput) Validate() error

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

type DescribeHomeRegionControlsOutput

type DescribeHomeRegionControlsOutput struct {

	// An array that contains your HomeRegionControl objects.
	HomeRegionControls []HomeRegionControl `type:"list"`

	// If a NextToken was returned by a previous call, more results are available.
	// To retrieve the next page of results, make the call again using the returned
	// token in NextToken.
	NextToken *string `type:"string"`
	// contains filtered or unexported fields
}

func (DescribeHomeRegionControlsOutput) String

String returns the string representation

type DescribeHomeRegionControlsPaginator

type DescribeHomeRegionControlsPaginator struct {
	aws.Pager
}

DescribeHomeRegionControlsPaginator is used to paginate the request. This can be done by calling Next and CurrentPage.

func NewDescribeHomeRegionControlsPaginator

func NewDescribeHomeRegionControlsPaginator(req DescribeHomeRegionControlsRequest) DescribeHomeRegionControlsPaginator

NewDescribeHomeRegionControlsRequestPaginator returns a paginator for DescribeHomeRegionControls. Use Next method to get the next page, and CurrentPage to get the current response page from the paginator. Next will return false, if there are no more pages, or an error was encountered.

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

// Example iterating over pages.
req := client.DescribeHomeRegionControlsRequest(input)
p := migrationhubconfig.NewDescribeHomeRegionControlsRequestPaginator(req)

for p.Next(context.TODO()) {
    page := p.CurrentPage()
}

if err := p.Err(); err != nil {
    return err
}

func (*DescribeHomeRegionControlsPaginator) CurrentPage

type DescribeHomeRegionControlsRequest

type DescribeHomeRegionControlsRequest struct {
	*aws.Request
	Input *DescribeHomeRegionControlsInput
	Copy  func(*DescribeHomeRegionControlsInput) DescribeHomeRegionControlsRequest
}

DescribeHomeRegionControlsRequest is the request type for the DescribeHomeRegionControls API operation.

func (DescribeHomeRegionControlsRequest) Send

Send marshals and sends the DescribeHomeRegionControls API request.

type DescribeHomeRegionControlsResponse

type DescribeHomeRegionControlsResponse struct {
	*DescribeHomeRegionControlsOutput
	// contains filtered or unexported fields
}

DescribeHomeRegionControlsResponse is the response type for the DescribeHomeRegionControls API operation.

func (*DescribeHomeRegionControlsResponse) SDKResponseMetdata

func (r *DescribeHomeRegionControlsResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the DescribeHomeRegionControls request.

type GetHomeRegionInput

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

func (GetHomeRegionInput) String

func (s GetHomeRegionInput) String() string

String returns the string representation

type GetHomeRegionOutput

type GetHomeRegionOutput struct {

	// The name of the home region of the calling account.
	HomeRegion *string `min:"1" type:"string"`
	// contains filtered or unexported fields
}

func (GetHomeRegionOutput) String

func (s GetHomeRegionOutput) String() string

String returns the string representation

type GetHomeRegionRequest

type GetHomeRegionRequest struct {
	*aws.Request
	Input *GetHomeRegionInput
	Copy  func(*GetHomeRegionInput) GetHomeRegionRequest
}

GetHomeRegionRequest is the request type for the GetHomeRegion API operation.

func (GetHomeRegionRequest) Send

Send marshals and sends the GetHomeRegion API request.

type GetHomeRegionResponse

type GetHomeRegionResponse struct {
	*GetHomeRegionOutput
	// contains filtered or unexported fields
}

GetHomeRegionResponse is the response type for the GetHomeRegion API operation.

func (*GetHomeRegionResponse) SDKResponseMetdata

func (r *GetHomeRegionResponse) SDKResponseMetdata() *aws.Response

SDKResponseMetdata returns the response metadata for the GetHomeRegion request.

type HomeRegionControl

type HomeRegionControl struct {

	// A unique identifier that's generated for each home region control. It's always
	// a string that begins with "hrc-" followed by 12 lowercase letters and numbers.
	ControlId *string `min:"1" type:"string"`

	// The AWS Region that's been set as home region. For example, "us-west-2" or
	// "eu-central-1" are valid home regions.
	HomeRegion *string `min:"1" type:"string"`

	// A timestamp representing the time when the customer called CreateHomeregionControl
	// and set the home region for the account.
	RequestedTime *time.Time `type:"timestamp"`

	// The target parameter specifies the identifier to which the home region is
	// applied, which is always an ACCOUNT. It applies the home region to the current
	// ACCOUNT.
	Target *Target `type:"structure"`
	// contains filtered or unexported fields
}

A home region control is an object that specifies the home region for an account, with some additional information. It contains a target (always of type ACCOUNT), an ID, and a time at which the home region was set.

func (HomeRegionControl) String

func (s HomeRegionControl) String() string

String returns the string representation

type Target

type Target struct {

	// The TargetID is a 12-character identifier of the ACCOUNT for which the control
	// was created. (This must be the current account.)
	Id *string `min:"12" type:"string"`

	// The target type is always an ACCOUNT.
	//
	// Type is a required field
	Type TargetType `type:"string" required:"true" enum:"true"`
	// contains filtered or unexported fields
}

The target parameter specifies the identifier to which the home region is applied, which is always an ACCOUNT. It applies the home region to the current ACCOUNT.

func (Target) String

func (s Target) String() string

String returns the string representation

func (*Target) Validate

func (s *Target) Validate() error

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

type TargetType

type TargetType string
const (
	TargetTypeAccount TargetType = "ACCOUNT"
)

Enum values for TargetType

func (TargetType) MarshalValue

func (enum TargetType) MarshalValue() (string, error)

func (TargetType) MarshalValueBuf

func (enum TargetType) MarshalValueBuf(b []byte) ([]byte, error)

Directories

Path Synopsis
Package migrationhubconfigiface provides an interface to enable mocking the AWS Migration Hub Config service client for testing your code.
Package migrationhubconfigiface provides an interface to enable mocking the AWS Migration Hub Config service client for testing your code.

Jump to

Keyboard shortcuts

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