ConfigurationContent

class aws_cdk.aws_appconfig.ConfigurationContent

Bases: object

Defines the hosted configuration content.

ExampleMetadata:

infused

Example:

app = appconfig.Application(self, "MyApp")
env = appconfig.Environment(self, "MyEnv",
    application=app
)

appconfig.HostedConfiguration(self, "MyHostedConfig",
    application=app,
    deploy_to=[env],
    content=appconfig.ConfigurationContent.from_inline_text("This is my configuration content.")
)

Attributes

content

The configuration content.

content_type

The configuration content type.

Static Methods

classmethod from_file(input_path, content_type=None)

Defines the hosted configuration content from a file.

Parameters:
  • input_path (str) – The path to the file that defines configuration content.

  • content_type (Optional[str]) – The content type of the configuration.

Return type:

ConfigurationContent

classmethod from_inline(content, content_type=None)

Defines the hosted configuration content from inline code.

Parameters:
  • content (str) – The inline code that defines the configuration content.

  • content_type (Optional[str]) – The content type of the configuration.

Return type:

ConfigurationContent

classmethod from_inline_json(content, content_type=None)

Defines the hosted configuration content as JSON from inline code.

Parameters:
  • content (str) – The inline code that defines the configuration content.

  • content_type (Optional[str]) – The content type of the configuration.

Return type:

ConfigurationContent

classmethod from_inline_text(content)

Defines the hosted configuration content as text from inline code.

Parameters:

content (str) – The inline code that defines the configuration content.

Return type:

ConfigurationContent

classmethod from_inline_yaml(content)

Defines the hosted configuration content as YAML from inline code.

Parameters:

content (str) – The inline code that defines the configuration content.

Return type:

ConfigurationContent