AppConfig / Client / get_environment
get_environment#
- AppConfig.Client.get_environment(**kwargs)#
Retrieves information about an environment. An environment is a deployment group of AppConfig applications, such as applications in a
Production
environment or in anEU_Region
environment. Each configuration deployment targets an environment. You can enable one or more Amazon CloudWatch alarms for an environment. If an alarm is triggered during a deployment, AppConfig roles back the configuration.See also: AWS API Documentation
Request Syntax
response = client.get_environment( ApplicationId='string', EnvironmentId='string' )
- Parameters:
ApplicationId (string) –
[REQUIRED]
The ID of the application that includes the environment you want to get.
EnvironmentId (string) –
[REQUIRED]
The ID of the environment that you want to get.
- Return type:
dict
- Returns:
Response Syntax
{ 'ApplicationId': 'string', 'Id': 'string', 'Name': 'string', 'Description': 'string', 'State': 'READY_FOR_DEPLOYMENT'|'DEPLOYING'|'ROLLING_BACK'|'ROLLED_BACK'|'REVERTED', 'Monitors': [ { 'AlarmArn': 'string', 'AlarmRoleArn': 'string' }, ] }
Response Structure
(dict) –
ApplicationId (string) –
The application ID.
Id (string) –
The environment ID.
Name (string) –
The name of the environment.
Description (string) –
The description of the environment.
State (string) –
The state of the environment. An environment can be in one of the following states:
READY_FOR_DEPLOYMENT
,DEPLOYING
,ROLLING_BACK
, orROLLED_BACK
Monitors (list) –
Amazon CloudWatch alarms monitored during the deployment.
(dict) –
Amazon CloudWatch alarms to monitor during the deployment process.
AlarmArn (string) –
Amazon Resource Name (ARN) of the Amazon CloudWatch alarm.
AlarmRoleArn (string) –
ARN of an Identity and Access Management (IAM) role for AppConfig to monitor
AlarmArn
.
Exceptions
Examples
The following get-environment example returns the details and state of the specified environment.
response = client.get_environment( ApplicationId='339ohji', EnvironmentId='54j1r29', ) print(response)
Expected Output:
{ 'ApplicationId': '339ohji', 'Id': '54j1r29', 'Name': 'Example-Environment', 'State': 'READY_FOR_DEPLOYMENT', 'ResponseMetadata': { '...': '...', }, }