AppConfig / Client / create_hosted_configuration_version
create_hosted_configuration_version#
- AppConfig.Client.create_hosted_configuration_version(**kwargs)#
Creates a new configuration in the AppConfig hosted configuration store.
See also: AWS API Documentation
Request Syntax
response = client.create_hosted_configuration_version( ApplicationId='string', ConfigurationProfileId='string', Description='string', Content=b'bytes'|file, ContentType='string', LatestVersionNumber=123, VersionLabel='string' )
- Parameters:
ApplicationId (string) –
[REQUIRED]
The application ID.
ConfigurationProfileId (string) –
[REQUIRED]
The configuration profile ID.
Description (string) – A description of the configuration.
Content (bytes or seekable file-like object) –
[REQUIRED]
The content of the configuration or the configuration data.
ContentType (string) –
[REQUIRED]
A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
LatestVersionNumber (integer) – An optional locking token used to prevent race conditions from overwriting configuration updates when creating a new version. To ensure your data is not overwritten when creating multiple hosted configuration versions in rapid succession, specify the version number of the latest hosted configuration version.
VersionLabel (string) – An optional, user-defined label for the AppConfig hosted configuration version. This value must contain at least one non-numeric character. For example, “v2.2.0”.
- Return type:
dict
- Returns:
Response Syntax
{ 'ApplicationId': 'string', 'ConfigurationProfileId': 'string', 'VersionNumber': 123, 'Description': 'string', 'Content': StreamingBody(), 'ContentType': 'string', 'VersionLabel': 'string', 'KmsKeyArn': 'string' }
Response Structure
(dict) –
ApplicationId (string) –
The application ID.
ConfigurationProfileId (string) –
The configuration profile ID.
VersionNumber (integer) –
The configuration version.
Description (string) –
A description of the configuration.
Content (
StreamingBody
) –The content of the configuration or the configuration data.
ContentType (string) –
A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
VersionLabel (string) –
A user-defined label for an AppConfig hosted configuration version.
KmsKeyArn (string) –
The Amazon Resource Name of the Key Management Service key that was used to encrypt this specific version of the configuration data in the AppConfig hosted configuration store.
Exceptions
AppConfig.Client.exceptions.BadRequestException
AppConfig.Client.exceptions.ServiceQuotaExceededException
AppConfig.Client.exceptions.ResourceNotFoundException
AppConfig.Client.exceptions.ConflictException
AppConfig.Client.exceptions.PayloadTooLargeException
AppConfig.Client.exceptions.InternalServerException
Examples
The following create-hosted-configuration-version example creates a new configuration in the AWS AppConfig configuration store.
response = client.create_hosted_configuration_version( ApplicationId='339ohji', ConfigurationProfileId='ur8hx2f', Content='eyAiTmFtZSI6ICJFeGFtcGxlQXBwbGljYXRpb24iLCAiSWQiOiBFeGFtcGxlSUQsICJSYW5rIjogNyB9', ContentType='text', LatestVersionNumber=1, ) print(response)
Expected Output:
{ 'ApplicationId': '339ohji', 'ConfigurationProfileId': 'ur8hx2f', 'ContentType': 'text', 'VersionNumber': 1, 'ResponseMetadata': { '...': '...', }, }