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'
)
[REQUIRED]
The application ID.
[REQUIRED]
The configuration profile ID.
[REQUIRED]
The content of the configuration or the configuration data.
[REQUIRED]
A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
dict
Response Syntax
{
'ApplicationId': 'string',
'ConfigurationProfileId': 'string',
'VersionNumber': 123,
'Description': 'string',
'Content': StreamingBody(),
'ContentType': 'string',
'VersionLabel': '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.
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': {
'...': '...',
},
}