Table of Contents
A low-level client representing 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.
For specific API usage, see the sections that follow in this AWS Migration Hub Home Region API reference.
import boto3
client = boto3.client('migrationhub-config')
These are the available methods:
Check if an operation can be paginated.
This API sets up the home region for the calling account only.
See also: AWS API Documentation
Request Syntax
response = client.create_home_region_control(
HomeRegion='string',
Target={
'Type': 'ACCOUNT',
'Id': 'string'
},
DryRun=True|False
)
[REQUIRED]
The name of the home region of the calling account.
[REQUIRED]
The account for which this command sets up a home region control. The Target is always of type ACCOUNT .
The target type is always an ACCOUNT .
The TargetID is a 12-character identifier of the ACCOUNT for which the control was created. (This must be the current account.)
dict
Response Syntax
{
'HomeRegionControl': {
'ControlId': 'string',
'HomeRegion': 'string',
'Target': {
'Type': 'ACCOUNT',
'Id': 'string'
},
'RequestedTime': datetime(2015, 1, 1)
}
}
Response Structure
(dict) --
HomeRegionControl (dict) --
This object is the HomeRegionControl object that's returned by a successful call to CreateHomeRegionControl .
ControlId (string) --
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.
HomeRegion (string) --
The AWS Region that's been set as home region. For example, "us-west-2" or "eu-central-1" are valid home regions.
Target (dict) --
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 .
Type (string) --
The target type is always an ACCOUNT .
Id (string) --
The TargetID is a 12-character identifier of the ACCOUNT for which the control was created. (This must be the current account.)
RequestedTime (datetime) --
A timestamp representing the time when the customer called CreateHomeregionControl and set the home region for the account.
Exceptions
This API permits filtering on the ControlId and HomeRegion fields.
See also: AWS API Documentation
Request Syntax
response = client.describe_home_region_controls(
ControlId='string',
HomeRegion='string',
Target={
'Type': 'ACCOUNT',
'Id': 'string'
},
MaxResults=123,
NextToken='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 .
The target type is always an ACCOUNT .
The TargetID is a 12-character identifier of the ACCOUNT for which the control was created. (This must be the current account.)
dict
Response Syntax
{
'HomeRegionControls': [
{
'ControlId': 'string',
'HomeRegion': 'string',
'Target': {
'Type': 'ACCOUNT',
'Id': 'string'
},
'RequestedTime': datetime(2015, 1, 1)
},
],
'NextToken': 'string'
}
Response Structure
(dict) --
HomeRegionControls (list) --
An array that contains your HomeRegionControl objects.
(dict) --
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.
ControlId (string) --
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.
HomeRegion (string) --
The AWS Region that's been set as home region. For example, "us-west-2" or "eu-central-1" are valid home regions.
Target (dict) --
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 .
Type (string) --
The target type is always an ACCOUNT .
Id (string) --
The TargetID is a 12-character identifier of the ACCOUNT for which the control was created. (This must be the current account.)
RequestedTime (datetime) --
A timestamp representing the time when the customer called CreateHomeregionControl and set the home region for the account.
NextToken (string) --
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 .
Exceptions
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.
See also: AWS API Documentation
Request Syntax
response = client.get_home_region()
{
'HomeRegion': 'string'
}
Response Structure
The name of the home region of the calling account.
Exceptions
Create a paginator for an operation.
Returns an object that can wait for some condition.
The available paginators are: