create_instance
¶
create_instance(
*,
config_overrides: Optional[SupplyChainClientConfig] = None,
instance_name: Optional[InstanceName] = None,
instance_description: Optional[InstanceDescription] = None,
kms_key_arn: Optional[KmsKeyArn] = None,
web_app_dns_domain: Optional[InstanceWebAppDnsDomain] = None,
tags: Optional[TagMap] = None,
client_token: Optional[ClientToken] = None,
) -> CreateInstanceResponse
Enables you to programmatically create an Amazon Web Services Supply Chain instance by applying KMS keys and relevant information associated with the API without using the Amazon Web Services console.
This is an asynchronous operation. Upon receiving a CreateInstance request, Amazon Web Services Supply Chain immediately returns the instance resource, instance ID, and the initializing state while simultaneously creating all required Amazon Web Services resources for an instance creation. You can use GetInstance to check the status of the instance. If the instance results in an unhealthy state, you need to check the error message, delete the current instance, and recreate a new one based on the mitigation from the error message.
Parameters:
-
instance_name(Optional[InstanceName], default:None) –The AWS Supply Chain instance name.
-
instance_description(Optional[InstanceDescription], default:None) –The AWS Supply Chain instance description.
-
kms_key_arn(Optional[KmsKeyArn], default:None) –The ARN (Amazon Resource Name) of the Key Management Service (KMS) key you provide for encryption. This is required if you do not want to use the Amazon Web Services owned KMS key. If you don't provide anything here, AWS Supply Chain uses the Amazon Web Services owned KMS key.
-
web_app_dns_domain(Optional[InstanceWebAppDnsDomain], default:None) –The DNS subdomain of the web app. This would be "example" in the URL "example.scn.global.on.aws". You can set this to a custom value, as long as the domain isn't already being used by someone else. The name may only include alphanumeric characters and hyphens.
-
tags(Optional[TagMap], default:None) –The Amazon Web Services tags of an instance to be created.
-
client_token(Optional[ClientToken], default:None) –The client token for idempotency.
Raises:
-
AccessDeniedException–You do not have the required privileges to perform this action.
-
ConflictException–Updating or deleting a resource can cause an inconsistent state.
-
InternalServerException–Unexpected error during processing of request.
-
ResourceNotFoundException–Request references a resource which does not exist.
-
ServiceQuotaExceededException–Request would cause a service quota to be exceeded.
-
ThrottlingException–Request was denied due to request throttling.
-
ValidationException–The input does not satisfy the constraints specified by an AWS service.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
Successful CreateInstance request with all input data
>>> client.create_instance(instance_name='example instance name', instance_description='example instance description', kms_key_arn='arn:aws:kms:us-west-2:123456789012:key/b14ffc39-b7d4-45ab-991a-6257a7f0d24d', tags={'tagKey1': 'tagValue1'})
Successful CreateInstance request with no input data
Source code in docs_src/capo_supplychain/_services/supply_chain.py
2208 2209 2210 2211 2212 2213 2214 2215 2216 2217 2218 2219 2220 2221 2222 2223 2224 2225 2226 2227 2228 2229 2230 2231 2232 2233 2234 2235 2236 2237 2238 2239 2240 2241 2242 2243 2244 2245 2246 2247 2248 2249 2250 2251 2252 2253 2254 2255 2256 2257 2258 2259 2260 2261 2262 2263 2264 2265 2266 2267 2268 2269 2270 2271 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 2286 2287 2288 2289 2290 2291 2292 2293 2294 | |