UNPKG

7.48 kBTypeScriptView Raw
1import {Request} from '../lib/request';
2import {Response} from '../lib/response';
3import {AWSError} from '../lib/error';
4import {Service} from '../lib/service';
5import {ServiceConfigurationOptions} from '../lib/service';
6import {ConfigBase as Config} from '../lib/config';
7interface Blob {}
8declare class MigrationHubConfig extends Service {
9 /**
10 * Constructs a service object. This object has one method for each API operation.
11 */
12 constructor(options?: MigrationHubConfig.Types.ClientConfiguration)
13 config: Config & MigrationHubConfig.Types.ClientConfiguration;
14 /**
15 * This API sets up the home region for the calling account only.
16 */
17 createHomeRegionControl(params: MigrationHubConfig.Types.CreateHomeRegionControlRequest, callback?: (err: AWSError, data: MigrationHubConfig.Types.CreateHomeRegionControlResult) => void): Request<MigrationHubConfig.Types.CreateHomeRegionControlResult, AWSError>;
18 /**
19 * This API sets up the home region for the calling account only.
20 */
21 createHomeRegionControl(callback?: (err: AWSError, data: MigrationHubConfig.Types.CreateHomeRegionControlResult) => void): Request<MigrationHubConfig.Types.CreateHomeRegionControlResult, AWSError>;
22 /**
23 * This API permits filtering on the ControlId, HomeRegion, and RegionControlScope fields.
24 */
25 describeHomeRegionControls(params: MigrationHubConfig.Types.DescribeHomeRegionControlsRequest, callback?: (err: AWSError, data: MigrationHubConfig.Types.DescribeHomeRegionControlsResult) => void): Request<MigrationHubConfig.Types.DescribeHomeRegionControlsResult, AWSError>;
26 /**
27 * This API permits filtering on the ControlId, HomeRegion, and RegionControlScope fields.
28 */
29 describeHomeRegionControls(callback?: (err: AWSError, data: MigrationHubConfig.Types.DescribeHomeRegionControlsResult) => void): Request<MigrationHubConfig.Types.DescribeHomeRegionControlsResult, AWSError>;
30 /**
31 * 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.
32 */
33 getHomeRegion(params: MigrationHubConfig.Types.GetHomeRegionRequest, callback?: (err: AWSError, data: MigrationHubConfig.Types.GetHomeRegionResult) => void): Request<MigrationHubConfig.Types.GetHomeRegionResult, AWSError>;
34 /**
35 * 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.
36 */
37 getHomeRegion(callback?: (err: AWSError, data: MigrationHubConfig.Types.GetHomeRegionResult) => void): Request<MigrationHubConfig.Types.GetHomeRegionResult, AWSError>;
38}
39declare namespace MigrationHubConfig {
40 export type ControlId = string;
41 export interface CreateHomeRegionControlRequest {
42 /**
43 * The name of the home region of the calling account.
44 */
45 HomeRegion: HomeRegion;
46 /**
47 * The account for which this command sets up a home region control. The Target is always of type ACCOUNT.
48 */
49 Target: Target;
50 /**
51 * Optional Boolean flag to indicate whether any effect should take place. It tests whether the caller has permission to make the call.
52 */
53 DryRun?: DryRun;
54 }
55 export interface CreateHomeRegionControlResult {
56 /**
57 * This object is the HomeRegionControl object that's returned by a successful call to CreateHomeRegionControl.
58 */
59 HomeRegionControl?: HomeRegionControl;
60 }
61 export type DescribeHomeRegionControlsMaxResults = number;
62 export interface DescribeHomeRegionControlsRequest {
63 /**
64 * The ControlID is a unique identifier string of your HomeRegionControl object.
65 */
66 ControlId?: ControlId;
67 /**
68 * The name of the home region you'd like to view.
69 */
70 HomeRegion?: HomeRegion;
71 /**
72 * 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.
73 */
74 Target?: Target;
75 /**
76 * The maximum number of filtering results to display per page.
77 */
78 MaxResults?: DescribeHomeRegionControlsMaxResults;
79 /**
80 * 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.
81 */
82 NextToken?: Token;
83 }
84 export interface DescribeHomeRegionControlsResult {
85 /**
86 * An array that contains your HomeRegionControl objects.
87 */
88 HomeRegionControls?: HomeRegionControls;
89 /**
90 * 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.
91 */
92 NextToken?: Token;
93 }
94 export type DryRun = boolean;
95 export interface GetHomeRegionRequest {
96 }
97 export interface GetHomeRegionResult {
98 /**
99 * The name of the home region of the calling account.
100 */
101 HomeRegion?: HomeRegion;
102 }
103 export type HomeRegion = string;
104 export interface HomeRegionControl {
105 /**
106 * 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.
107 */
108 ControlId?: ControlId;
109 /**
110 * The AWS Region that's been set as home region. For example, "us-west-2" or "eu-central-1" are valid home regions.
111 */
112 HomeRegion?: HomeRegion;
113 /**
114 * 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.
115 */
116 Target?: Target;
117 /**
118 * A timestamp representing the time when the customer called CreateHomeregionControl and set the home region for the account.
119 */
120 RequestedTime?: RequestedTime;
121 }
122 export type HomeRegionControls = HomeRegionControl[];
123 export type RequestedTime = Date;
124 export interface Target {
125 /**
126 * The target type is always an ACCOUNT.
127 */
128 Type: TargetType;
129 /**
130 * The TargetID is a 12-character identifier of the ACCOUNT for which the control was created. (This must be the current account.)
131 */
132 Id?: TargetId;
133 }
134 export type TargetId = string;
135 export type TargetType = "ACCOUNT"|string;
136 export type Token = string;
137 /**
138 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
139 */
140 export type apiVersion = "2019-06-30"|"latest"|string;
141 export interface ClientApiVersions {
142 /**
143 * A string in YYYY-MM-DD format that represents the latest possible API version that can be used in this service. Specify 'latest' to use the latest possible version.
144 */
145 apiVersion?: apiVersion;
146 }
147 export type ClientConfiguration = ServiceConfigurationOptions & ClientApiVersions;
148 /**
149 * Contains interfaces for use with the MigrationHubConfig client.
150 */
151 export import Types = MigrationHubConfig;
152}
153export = MigrationHubConfig;