CfnIntegrationPropsMixin

class aws_cdk.mixins_preview.aws_logs.mixins.CfnIntegrationPropsMixin(props, *, strategy=None)

Bases: Mixin

Creates an integration between CloudWatch Logs and another service in this account.

Currently, only integrations with OpenSearch Service are supported, and currently you can have only one integration in your account.

Integrating with OpenSearch Service makes it possible for you to create curated vended logs dashboards, powered by OpenSearch Service analytics. For more information, see Vended log dashboards powered by Amazon OpenSearch Service .

You can use this operation only to create a new integration. You can’t modify an existing integration.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-logs-integration.html

CloudformationResource:

AWS::Logs::Integration

Mixin:

true

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview import mixins
from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins

cfn_integration_props_mixin = logs_mixins.CfnIntegrationPropsMixin(logs_mixins.CfnIntegrationMixinProps(
    integration_name="integrationName",
    integration_type="integrationType",
    resource_config=logs_mixins.CfnIntegrationPropsMixin.ResourceConfigProperty(
        open_search_resource_config=logs_mixins.CfnIntegrationPropsMixin.OpenSearchResourceConfigProperty(
            application_arn="applicationArn",
            dashboard_viewer_principals=["dashboardViewerPrincipals"],
            data_source_role_arn="dataSourceRoleArn",
            kms_key_arn="kmsKeyArn",
            retention_days=123
        )
    )
),
    strategy=mixins.PropertyMergeStrategy.OVERRIDE
)

Create a mixin to apply properties to AWS::Logs::Integration.

Parameters:
  • props (Union[CfnIntegrationMixinProps, Dict[str, Any]]) – L1 properties to apply.

  • strategy (Optional[PropertyMergeStrategy]) – (experimental) Strategy for merging nested properties. Default: - PropertyMergeStrategy.MERGE

Methods

apply_to(construct)

Apply the mixin properties to the construct.

Parameters:

construct (IConstruct)

Return type:

IConstruct

supports(construct)

Check if this mixin supports the given construct.

Parameters:

construct (IConstruct)

Return type:

bool

Attributes

CFN_PROPERTY_KEYS = ['integrationName', 'integrationType', 'resourceConfig']

Static Methods

classmethod is_mixin(x)

(experimental) Checks if x is a Mixin.

Parameters:

x (Any) – Any object.

Return type:

bool

Returns:

true if x is an object created from a class which extends Mixin.

Stability:

experimental

OpenSearchResourceConfigProperty

class CfnIntegrationPropsMixin.OpenSearchResourceConfigProperty(*, application_arn=None, dashboard_viewer_principals=None, data_source_role_arn=None, kms_key_arn=None, retention_days=None)

Bases: object

This structure contains configuration details about an integration between CloudWatch Logs and OpenSearch Service.

Parameters:
  • application_arn (Optional[str]) – If you want to use an existing OpenSearch Service application for your integration with OpenSearch Service, specify it here. If you omit this, a new application will be created.

  • dashboard_viewer_principals (Optional[Sequence[str]]) – Specify the ARNs of IAM roles and IAM users who you want to grant permission to for viewing the dashboards. .. epigraph:: In addition to specifying these users here, you must also grant them the CloudWatchOpenSearchDashboardAccess IAM policy. For more information, see IAM policies for users .

  • data_source_role_arn (Optional[str]) – Specify the ARN of an IAM role that CloudWatch Logs will use to create the integration. This role must have the permissions necessary to access the OpenSearch Service collection to be able to create the dashboards. For more information about the permissions needed, see Permissions that the integration needs in the CloudWatch Logs User Guide.

  • kms_key_arn (Optional[str]) – To have the vended dashboard data encrypted with AWS instead of the CloudWatch Logs default encryption method, specify the ARN of the AWS key that you want to use.

  • retention_days (Union[int, float, None]) – Specify how many days that you want the data derived by OpenSearch Service to be retained in the index that the dashboard refers to. This also sets the maximum time period that you can choose when viewing data in the dashboard. Choosing a longer time frame will incur additional costs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-integration-opensearchresourceconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins

open_search_resource_config_property = logs_mixins.CfnIntegrationPropsMixin.OpenSearchResourceConfigProperty(
    application_arn="applicationArn",
    dashboard_viewer_principals=["dashboardViewerPrincipals"],
    data_source_role_arn="dataSourceRoleArn",
    kms_key_arn="kmsKeyArn",
    retention_days=123
)

Attributes

application_arn

If you want to use an existing OpenSearch Service application for your integration with OpenSearch Service, specify it here.

If you omit this, a new application will be created.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-integration-opensearchresourceconfig.html#cfn-logs-integration-opensearchresourceconfig-applicationarn

dashboard_viewer_principals

Specify the ARNs of IAM roles and IAM users who you want to grant permission to for viewing the dashboards.

In addition to specifying these users here, you must also grant them the CloudWatchOpenSearchDashboardAccess IAM policy. For more information, see IAM policies for users .

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-integration-opensearchresourceconfig.html#cfn-logs-integration-opensearchresourceconfig-dashboardviewerprincipals

data_source_role_arn

Specify the ARN of an IAM role that CloudWatch Logs will use to create the integration.

This role must have the permissions necessary to access the OpenSearch Service collection to be able to create the dashboards. For more information about the permissions needed, see Permissions that the integration needs in the CloudWatch Logs User Guide.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-integration-opensearchresourceconfig.html#cfn-logs-integration-opensearchresourceconfig-datasourcerolearn

kms_key_arn

To have the vended dashboard data encrypted with AWS instead of the CloudWatch Logs default encryption method, specify the ARN of the AWS key that you want to use.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-integration-opensearchresourceconfig.html#cfn-logs-integration-opensearchresourceconfig-kmskeyarn

retention_days

Specify how many days that you want the data derived by OpenSearch Service to be retained in the index that the dashboard refers to.

This also sets the maximum time period that you can choose when viewing data in the dashboard. Choosing a longer time frame will incur additional costs.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-integration-opensearchresourceconfig.html#cfn-logs-integration-opensearchresourceconfig-retentiondays

ResourceConfigProperty

class CfnIntegrationPropsMixin.ResourceConfigProperty(*, open_search_resource_config=None)

Bases: object

This structure contains configuration details about an integration between CloudWatch Logs and another entity.

Parameters:

open_search_resource_config (Union[IResolvable, OpenSearchResourceConfigProperty, Dict[str, Any], None]) – This structure contains configuration details about an integration between CloudWatch Logs and OpenSearch Service.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-integration-resourceconfig.html

ExampleMetadata:

fixture=_generated

Example:

# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk.mixins_preview.aws_logs import mixins as logs_mixins

resource_config_property = logs_mixins.CfnIntegrationPropsMixin.ResourceConfigProperty(
    open_search_resource_config=logs_mixins.CfnIntegrationPropsMixin.OpenSearchResourceConfigProperty(
        application_arn="applicationArn",
        dashboard_viewer_principals=["dashboardViewerPrincipals"],
        data_source_role_arn="dataSourceRoleArn",
        kms_key_arn="kmsKeyArn",
        retention_days=123
    )
)

Attributes

open_search_resource_config

This structure contains configuration details about an integration between CloudWatch Logs and OpenSearch Service.

See:

http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-logs-integration-resourceconfig.html#cfn-logs-integration-resourceconfig-opensearchresourceconfig