create_configuration_profile
async
¶
create_configuration_profile(
application_id: Name,
name: LongName,
location_uri: Uri,
*,
config_overrides: Optional[AsyncAppConfigClientConfig] = None,
description: Optional[Description] = None,
retrieval_role_arn: Optional[RoleArn] = None,
validators: Optional[ValidatorList] = None,
tags: Optional[TagMap] = None,
type: Optional[ConfigurationProfileType] = None,
kms_key_identifier: Optional[KmsKeyIdentifier] = None,
) -> ConfigurationProfile
Creates a configuration profile, which is information that enables AppConfig to access the configuration source. Valid configuration sources include the following:
-
Configuration data in YAML, JSON, and other formats stored in the AppConfig hosted configuration store
-
Configuration data stored as objects in an Amazon Simple Storage Service (Amazon S3) bucket
-
Pipelines stored in CodePipeline
-
Secrets stored in Secrets Manager
-
Standard and secure string parameters stored in Amazon Web Services Systems Manager Parameter Store
-
Configuration data in SSM documents stored in the Systems Manager document store
A configuration profile includes the following information:
-
The URI location of the configuration data.
-
The Identity and Access Management (IAM) role that provides access to the configuration data.
-
A validator for the configuration data. Available validators include either a JSON Schema or an Amazon Web Services Lambda function.
For more information, see Create a Configuration and a Configuration Profile in the AppConfig User Guide.
Parameters:
-
application_id(Name) –The application ID.
-
name(LongName) –A name for the configuration profile.
-
description(Optional[Description], default:None) –A description of the configuration profile.
-
location_uri(Uri) –A URI to locate the configuration. You can specify the following:
-
For the AppConfig hosted configuration store and for feature flags, specify
hosted. -
For an Amazon Web Services Systems Manager Parameter Store parameter, specify either the parameter name in the format
ssm-parameter://or the ARN. -
For an Amazon Web Services CodePipeline pipeline, specify the URI in the following format:
codepipeline://. -
For an Secrets Manager secret, specify the URI in the following format:
secretsmanager://. -
For an Amazon S3 object, specify the URI in the following format:
s3://. Here is an example:/ s3://amzn-s3-demo-bucket/my-app/us-east-1/my-config.json -
For an SSM document, specify either the document name in the format
ssm-document://or the Amazon Resource Name (ARN).
-
-
retrieval_role_arn(Optional[RoleArn], default:None) –The ARN of an IAM role with permission to access the configuration at the specified
LocationUri.A retrieval role ARN is not required for configurations stored in CodePipeline or the AppConfig hosted configuration store. It is required for all other sources that store your configuration.
-
validators(Optional[ValidatorList], default:None) –A list of methods for validating the configuration.
-
tags(Optional[TagMap], default:None) –Metadata to assign to the configuration profile. Tags help organize and categorize your AppConfig resources. Each tag consists of a key and an optional value, both of which you define.
-
type(Optional[ConfigurationProfileType], default:None) –The type of configurations contained in the profile. AppConfig supports
feature flagsandfreeformconfigurations. We recommend you create feature flag configurations to enable or disable new features and freeform configurations to distribute configurations to an application. When calling this API, enter one of the following values forType:AWS.AppConfig.FeatureFlagsAWS.Freeform -
kms_key_identifier(Optional[KmsKeyIdentifier], default:None) –The identifier for an Key Management Service key to encrypt new configuration data versions in the AppConfig hosted configuration store. This attribute is only used for
hostedconfiguration types. The identifier can be an KMS key ID, alias, or the Amazon Resource Name (ARN) of the key ID or alias. To encrypt data managed in other configuration stores, see the documentation for how to specify an KMS key for that particular service.
Raises:
-
BadRequestException–The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
InternalServerException–There was an internal failure in the AppConfig service.
-
ResourceNotFoundException–The requested resource could not be found.
-
ServiceQuotaExceededException–The number of one more AppConfig resources exceeds the maximum allowed. Verify that your environment doesn't exceed the following service quotas:
Applications: 100 max
To resolve this issue, you can delete one or more resources and try again. Or, you can request a quota increase. For more information about quotas and to request an increase, see Service quotas for AppConfig in the Amazon Web Services General Reference.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To create a configuration profile The following create-configuration-profile example creates a configuration profile using a configuration stored in Parameter Store, a capability of Systems Manager.
>>> await client.create_configuration_profile(application_id='339ohji', name='Example-Configuration-Profile', location_uri='ssm-parameter://Example-Parameter', retrieval_role_arn='arn:aws:iam::111122223333:role/Example-App-Config-Role')
Source code in docs_src/capo_appconfig/_services/async_app_config.py
343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 | |