get_configuration
¶
get_configuration(
application: StringWithLengthBetween1And64,
environment: StringWithLengthBetween1And64,
configuration: StringWithLengthBetween1And64,
client_id: StringWithLengthBetween1And64,
*,
config_overrides: Optional[AppConfigClientConfig] = None,
client_configuration_version: Optional[Version] = None,
) -> Configuration
(Deprecated) Retrieves the latest deployed configuration.
Note the following important information.
-
This API action is deprecated. Calls to receive configuration data should use the StartConfigurationSession and GetLatestConfiguration APIs instead.
-
GetConfiguration is a priced call. For more information, see Pricing.
Parameters:
-
application(StringWithLengthBetween1And64) –The application to get. Specify either the application name or the application ID.
-
environment(StringWithLengthBetween1And64) –The environment to get. Specify either the environment name or the environment ID.
-
configuration(StringWithLengthBetween1And64) –The configuration to get. Specify either the configuration name or the configuration ID.
-
client_id(StringWithLengthBetween1And64) –The clientId parameter in the following command is a unique, user-specified ID to identify the client for the configuration. This ID enables AppConfig to deploy the configuration in intervals, as defined in the deployment strategy.
-
client_configuration_version(Optional[Version], default:None) –The configuration version returned in the most recent GetConfiguration response.
AppConfig uses the value of the
ClientConfigurationVersionparameter to identify the configuration version on your clients. If you don’t sendClientConfigurationVersionwith each call to GetConfiguration, your clients receive the current configuration. You are charged each time your clients receive a configuration.To avoid excess charges, we recommend you use the StartConfigurationSession and GetLatestConfiguration APIs, which track the client configuration version on your behalf. If you choose to continue using GetConfiguration, we recommend that you include the
ClientConfigurationVersionvalue with every call to GetConfiguration. The value to use forClientConfigurationVersioncomes from theConfigurationVersionattribute returned by GetConfiguration when there is new or updated data, and should be saved for subsequent calls to GetConfiguration.For more information about working with configurations, see Retrieving feature flags and configuration data in AppConfig in the AppConfig User Guide.
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.
-
UnknownServiceError–The service returned an error code this client does not model.
Examples:
To retrieve configuration details The following get-configuration example returns the configuration details of the example application. On subsequent calls to get-configuration, use the client-configuration-version parameter to only update the configuration of your application if the version has changed. Only updating the configuration when the version has changed avoids excess charges incurred by calling get-configuration.
>>> client.get_configuration(application='example-application', environment='Example-Environment', configuration='Example-Configuration-Profile', client_id='example-id')
Source code in docs_src/capo_appconfig/_services/app_config.py
1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 | |