Class Environment
An AWS AppConfig environment.
Inherited Members
Namespace: Amazon.CDK.AWS.AppConfig
Assembly: Amazon.CDK.Lib.dll
Syntax (csharp)
public class Environment : Resource, IEnvironment, IResource, IExtensible
Syntax (vb)
Public Class Environment
Inherits Resource
Implements IEnvironment, IResource, IExtensible
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
Examples
var app = new Application(this, "MyApp");
var env = new Environment(this, "MyEnv", new EnvironmentProps {
Application = app
});
new HostedConfiguration(this, "MyFirstHostedConfig", new HostedConfigurationProps {
Application = app,
DeployTo = new [] { env },
Content = ConfigurationContent.FromInlineText("This is my first configuration content.")
});
new HostedConfiguration(this, "MySecondHostedConfig", new HostedConfigurationProps {
Application = app,
DeployTo = new [] { env },
Content = ConfigurationContent.FromInlineText("This is my second configuration content.")
});
Synopsis
Constructors
Environment(ByRefValue) | Used by jsii to construct an instance of this class from a Javascript-owned object reference |
Environment(DeputyBase.DeputyProps) | Used by jsii to construct an instance of this class from DeputyProps |
Environment(Construct, String, IEnvironmentProps) |
Properties
Application | The application associated with the environment. |
ApplicationId | The ID of the environment. |
DeploymentQueue | |
Description | The description of the environment. |
EnvironmentArn | The Amazon Resource Name (ARN) of the environment. |
EnvironmentId | The ID of the environment. |
Extensible | |
Monitors | The monitors for the environment. |
Name | The name of the environment. |
Methods
AddDeployment(IConfiguration) | Creates a deployment of the supplied configuration to this environment. |
AddDeployments(IConfiguration[]) | Creates a deployment for each of the supplied configurations to this environment. |
AddExtension(IExtension) | Adds an extension association to the environment. |
FromEnvironmentArn(Construct, String, String) | Imports an environment into the CDK using its Amazon Resource Name (ARN). |
FromEnvironmentAttributes(Construct, String, IEnvironmentAttributes) | Imports an environment into the CDK from its attributes. |
Grant(IGrantable, String[]) | Adds an IAM policy statement associated with this environment to an IAM principal's policy. |
GrantReadConfig(IGrantable) | Permits an IAM principal to perform read operations on this environment's configurations. |
On(ActionPoint, IEventDestination, IExtensionOptions) | Adds an extension defined by the action point and event destination and also creates an extension association to the environment. |
OnDeploymentBaking(IEventDestination, IExtensionOptions) | Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment. |
OnDeploymentComplete(IEventDestination, IExtensionOptions) | Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment. |
OnDeploymentRolledBack(IEventDestination, IExtensionOptions) | Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment. |
OnDeploymentStart(IEventDestination, IExtensionOptions) | Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment. |
OnDeploymentStep(IEventDestination, IExtensionOptions) | Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment. |
PreCreateHostedConfigurationVersion(IEventDestination, IExtensionOptions) | Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment. |
PreStartDeployment(IEventDestination, IExtensionOptions) | Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment. |
Constructors
Environment(ByRefValue)
Used by jsii to construct an instance of this class from a Javascript-owned object reference
protected Environment(ByRefValue reference)
Parameters
- reference Amazon.JSII.Runtime.Deputy.ByRefValue
The Javascript-owned object reference
Environment(DeputyBase.DeputyProps)
Used by jsii to construct an instance of this class from DeputyProps
protected Environment(DeputyBase.DeputyProps props)
Parameters
- props Amazon.JSII.Runtime.Deputy.DeputyBase.DeputyProps
The deputy props
Environment(Construct, String, IEnvironmentProps)
public Environment(Construct scope, string id, IEnvironmentProps props)
Parameters
- scope Constructs.Construct
- id System.String
- props IEnvironmentProps
Properties
Application
The application associated with the environment.
public virtual IApplication Application { get; }
Property Value
ApplicationId
The ID of the environment.
public virtual string ApplicationId { get; }
Property Value
System.String
DeploymentQueue
Description
The description of the environment.
public virtual string Description { get; }
Property Value
System.String
EnvironmentArn
The Amazon Resource Name (ARN) of the environment.
public virtual string EnvironmentArn { get; }
Property Value
System.String
Remarks
Attribute: true
EnvironmentId
The ID of the environment.
public virtual string EnvironmentId { get; }
Property Value
System.String
Remarks
Attribute: true
Extensible
Monitors
The monitors for the environment.
public virtual Monitor[] Monitors { get; }
Property Value
Monitor[]
Name
The name of the environment.
public virtual string Name { get; }
Property Value
System.String
Methods
AddDeployment(IConfiguration)
Creates a deployment of the supplied configuration to this environment.
public virtual void AddDeployment(IConfiguration configuration)
Parameters
- configuration IConfiguration
Remarks
Note that you can only deploy one configuration at a time to an environment. However, you can deploy one configuration each to different environments at the same time. If more than one deployment is requested for this environment, they will occur in the same order they were provided.
AddDeployments(IConfiguration[])
Creates a deployment for each of the supplied configurations to this environment.
public virtual void AddDeployments(params IConfiguration[] configurations)
Parameters
- configurations IConfiguration[]
Remarks
These configurations will be deployed in the same order as the input array.
AddExtension(IExtension)
Adds an extension association to the environment.
public virtual void AddExtension(IExtension extension)
Parameters
- extension IExtension
FromEnvironmentArn(Construct, String, String)
Imports an environment into the CDK using its Amazon Resource Name (ARN).
public static IEnvironment FromEnvironmentArn(Construct scope, string id, string environmentArn)
Parameters
- scope Constructs.Construct
The parent construct.
- id System.String
The name of the environment construct.
- environmentArn System.String
The Amazon Resource Name (ARN) of the environment.
Returns
FromEnvironmentAttributes(Construct, String, IEnvironmentAttributes)
Imports an environment into the CDK from its attributes.
public static IEnvironment FromEnvironmentAttributes(Construct scope, string id, IEnvironmentAttributes attrs)
Parameters
- scope Constructs.Construct
The parent construct.
- id System.String
The name of the environment construct.
- attrs IEnvironmentAttributes
The attributes of the environment.
Returns
Grant(IGrantable, String[])
Adds an IAM policy statement associated with this environment to an IAM principal's policy.
public virtual Grant Grant(IGrantable grantee, params string[] actions)
Parameters
- grantee IGrantable
- actions System.String[]
Returns
GrantReadConfig(IGrantable)
Permits an IAM principal to perform read operations on this environment's configurations.
public virtual Grant GrantReadConfig(IGrantable identity)
Parameters
- identity IGrantable
Returns
Remarks
Actions: GetLatestConfiguration, StartConfigurationSession.
On(ActionPoint, IEventDestination, IExtensionOptions)
Adds an extension defined by the action point and event destination and also creates an extension association to the environment.
public virtual void On(ActionPoint actionPoint, IEventDestination eventDestination, IExtensionOptions options = null)
Parameters
- actionPoint ActionPoint
- eventDestination IEventDestination
- options IExtensionOptions
OnDeploymentBaking(IEventDestination, IExtensionOptions)
Adds an ON_DEPLOYMENT_BAKING extension with the provided event destination and also creates an extension association to the environment.
public virtual void OnDeploymentBaking(IEventDestination eventDestination, IExtensionOptions options = null)
Parameters
- eventDestination IEventDestination
- options IExtensionOptions
OnDeploymentComplete(IEventDestination, IExtensionOptions)
Adds an ON_DEPLOYMENT_COMPLETE extension with the provided event destination and also creates an extension association to the environment.
public virtual void OnDeploymentComplete(IEventDestination eventDestination, IExtensionOptions options = null)
Parameters
- eventDestination IEventDestination
- options IExtensionOptions
OnDeploymentRolledBack(IEventDestination, IExtensionOptions)
Adds an ON_DEPLOYMENT_ROLLED_BACK extension with the provided event destination and also creates an extension association to the environment.
public virtual void OnDeploymentRolledBack(IEventDestination eventDestination, IExtensionOptions options = null)
Parameters
- eventDestination IEventDestination
- options IExtensionOptions
OnDeploymentStart(IEventDestination, IExtensionOptions)
Adds an ON_DEPLOYMENT_START extension with the provided event destination and also creates an extension association to the environment.
public virtual void OnDeploymentStart(IEventDestination eventDestination, IExtensionOptions options = null)
Parameters
- eventDestination IEventDestination
- options IExtensionOptions
OnDeploymentStep(IEventDestination, IExtensionOptions)
Adds an ON_DEPLOYMENT_STEP extension with the provided event destination and also creates an extension association to the environment.
public virtual void OnDeploymentStep(IEventDestination eventDestination, IExtensionOptions options = null)
Parameters
- eventDestination IEventDestination
- options IExtensionOptions
PreCreateHostedConfigurationVersion(IEventDestination, IExtensionOptions)
Adds a PRE_CREATE_HOSTED_CONFIGURATION_VERSION extension with the provided event destination and also creates an extension association to the environment.
public virtual void PreCreateHostedConfigurationVersion(IEventDestination eventDestination, IExtensionOptions options = null)
Parameters
- eventDestination IEventDestination
- options IExtensionOptions
PreStartDeployment(IEventDestination, IExtensionOptions)
Adds a PRE_START_DEPLOYMENT extension with the provided event destination and also creates an extension association to the environment.
public virtual void PreStartDeployment(IEventDestination eventDestination, IExtensionOptions options = null)
Parameters
- eventDestination IEventDestination
- options IExtensionOptions