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, IConstruct, IDependable, IExtensible
Syntax (vb)
Public Class Environment Inherits Resource Implements IEnvironment, IResource, IConstruct, IDependable, 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(Construct, string, IEnvironmentProps) | An AWS AppConfig environment. |
Properties
Application | The application associated with the environment. |
ApplicationId | The ID of the environment. |
DeploymentQueue | An AWS AppConfig environment. |
Description | The description of the environment. |
EnvironmentArn | The Amazon Resource Name (ARN) of the environment. |
EnvironmentId | The ID of the environment. |
Extensible | An AWS AppConfig environment. |
Monitors | The monitors for the environment. |
Name | The name of the environment. |
PROPERTY_INJECTION_ID | Uniquely identifies this class. |
Methods
AddDeployment(IConfiguration) | Creates a deployment of the supplied configuration to this environment. |
AddDeployments(params IConfiguration[]) | Creates a deployment for each of the supplied configurations to this environment. |
AddExtension(IExtension) | Adds an extension association to the environment. |
AtDeploymentTick(IEventDestination, IExtensionOptions?) | Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application. |
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, params 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(Construct, string, IEnvironmentProps)
An AWS AppConfig environment.
public Environment(Construct scope, string id, IEnvironmentProps props)
Parameters
- scope Construct
- id string
- props IEnvironmentProps
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.")
});
Properties
Application
The application associated with the environment.
public virtual IApplication? Application { get; }
Property Value
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
ApplicationId
The ID of the environment.
public virtual string ApplicationId { get; }
Property Value
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
DeploymentQueue
An AWS AppConfig environment.
protected virtual CfnDeployment[] DeploymentQueue { get; set; }
Property Value
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.")
});
Description
The description of the environment.
public virtual string? Description { get; }
Property Value
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
EnvironmentArn
The Amazon Resource Name (ARN) of the environment.
public virtual string EnvironmentArn { get; }
Property Value
Remarks
Attribute: true
EnvironmentId
The ID of the environment.
public virtual string EnvironmentId { get; }
Property Value
Remarks
Attribute: true
Extensible
An AWS AppConfig environment.
protected virtual ExtensibleBase Extensible { get; set; }
Property Value
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.")
});
Monitors
The monitors for the environment.
public virtual Monitor[]? Monitors { get; }
Property Value
Monitor[]
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
Name
The name of the environment.
public virtual string? Name { get; }
Property Value
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
PROPERTY_INJECTION_ID
Uniquely identifies this class.
public static string PROPERTY_INJECTION_ID { get; }
Property Value
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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(params 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
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
AtDeploymentTick(IEventDestination, IExtensionOptions?)
Adds an AT_DEPLOYMENT_TICK extension with the provided event destination and also creates an extension association to an application.
public virtual void AtDeploymentTick(IEventDestination eventDestination, IExtensionOptions? options = null)
Parameters
- eventDestination IEventDestination
- options IExtensionOptions
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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 Construct
The parent construct.
- id string
The name of the environment construct.
- environmentArn string
The Amazon Resource Name (ARN) of the environment.
Returns
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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 Construct
The parent construct.
- id string
The name of the environment construct.
- attrs IEnvironmentAttributes
The attributes of the environment.
Returns
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
Grant(IGrantable, params 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 string[]
Returns
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused
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
Remarks
See: https://docs.aws.amazon.com/appconfig/latest/userguide/appconfig-creating-environment.html
Resource: AWS::AppConfig::Environment
ExampleMetadata: infused