class ConfigurationContent
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppConfig.ConfigurationContent |
Go | github.com/aws/aws-cdk-go/awscdk/v2/awsappconfig#ConfigurationContent |
Java | software.amazon.awscdk.services.appconfig.ConfigurationContent |
Python | aws_cdk.aws_appconfig.ConfigurationContent |
TypeScript (source) | aws-cdk-lib » aws_appconfig » ConfigurationContent |
Defines the hosted configuration content.
Example
const app = new appconfig.Application(this, 'MyApp');
const env = new appconfig.Environment(this, 'MyEnv', {
application: app,
});
new appconfig.HostedConfiguration(this, 'MyHostedConfig', {
application: app,
deployTo: [env],
content: appconfig.ConfigurationContent.fromInlineText('This is my configuration content.'),
});
Initializer
new ConfigurationContent()
Properties
Name | Type | Description |
---|---|---|
content | string | The configuration content. |
content | string | The configuration content type. |
content
Type:
string
The configuration content.
contentType
Type:
string
The configuration content type.
Methods
Name | Description |
---|---|
static from | Defines the hosted configuration content from a file. |
static from | Defines the hosted configuration content from inline code. |
static from | Defines the hosted configuration content as JSON from inline code. |
static from | Defines the hosted configuration content as text from inline code. |
static from | Defines the hosted configuration content as YAML from inline code. |
File(inputPath, contentType?)
static frompublic static fromFile(inputPath: string, contentType?: string): ConfigurationContent
Parameters
- inputPath
string
— The path to the file that defines configuration content. - contentType
string
— The content type of the configuration.
Returns
Defines the hosted configuration content from a file.
Inline(content, contentType?)
static frompublic static fromInline(content: string, contentType?: string): ConfigurationContent
Parameters
- content
string
— The inline code that defines the configuration content. - contentType
string
— The content type of the configuration.
Returns
Defines the hosted configuration content from inline code.
InlineJson(content, contentType?)
static frompublic static fromInlineJson(content: string, contentType?: string): ConfigurationContent
Parameters
- content
string
— The inline code that defines the configuration content. - contentType
string
— The content type of the configuration.
Returns
Defines the hosted configuration content as JSON from inline code.
InlineText(content)
static frompublic static fromInlineText(content: string): ConfigurationContent
Parameters
- content
string
— The inline code that defines the configuration content.
Returns
Defines the hosted configuration content as text from inline code.
InlineYaml(content)
static frompublic static fromInlineYaml(content: string): ConfigurationContent
Parameters
- content
string
— The inline code that defines the configuration content.
Returns
Defines the hosted configuration content as YAML from inline code.