create_hosted_configuration_version
¶
create_hosted_configuration_version(
application_id: Name,
configuration_profile_id: LongName,
content: Blob,
content_type: StringWithLengthBetween1And255,
*,
config_overrides: Optional[AppConfigClientConfig] = None,
description: Optional[Description] = None,
latest_version_number: Optional[Integer] = None,
version_label: Optional[VersionLabel] = None,
) -> HostedConfigurationVersion
Creates a new configuration in the AppConfig hosted configuration store. If you're creating a feature flag, we recommend you familiarize yourself with the JSON schema for feature flag data. For more information, see Type reference for AWS.AppConfig.FeatureFlags in the AppConfig User Guide.
Parameters:
-
application_id(Name) –The application ID.
-
configuration_profile_id(LongName) –The configuration profile ID.
-
description(Optional[Description], default:None) –A description of the configuration.
Due to HTTP limitations, this field only supports ASCII characters.
-
content(Blob) –The configuration data, as bytes.
AppConfig accepts any type of data, including text formats like JSON or TOML, or binary formats like protocol buffers or compressed data.
-
content_type(StringWithLengthBetween1And255) –A standard MIME type describing the format of the configuration content. For more information, see Content-Type.
-
latest_version_number(Optional[Integer], default:None) –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.
-
version_label(Optional[VersionLabel], default:None) –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".
Raises:
-
BadRequestException–The input fails to satisfy the constraints specified by an Amazon Web Services service.
-
ConflictException–The request could not be processed because of conflict in the current state of the resource.
-
InternalServerException–There was an internal failure in the AppConfig service.
-
PayloadTooLargeException–The configuration size is too large.
-
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 hosted configuration version The following create-hosted-configuration-version example creates a new configuration in the AWS AppConfig configuration store.
>>> client.create_hosted_configuration_version(application_id='339ohji', configuration_profile_id='ur8hx2f', content='eyAiTmFtZSI6ICJFeGFtcGxlQXBwbGljYXRpb24iLCAiSWQiOiBFeGFtcGxlSUQsICJSYW5rIjogNyB9', content_type='text', latest_version_number=1)
Source code in docs_src/capo_appconfig/_services/app_config.py
829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 | |