Class: AWSCDK::APS::CfnWorkspaceProps

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
aps/cfn_workspace_props.rb

Overview

Properties for defining a CfnWorkspace.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(alert_manager_definition: nil, _alias: nil, kms_key_arn: nil, logging_configuration: nil, query_logging_configuration: nil, tags: nil, workspace_configuration: nil) ⇒ CfnWorkspaceProps

Returns a new instance of CfnWorkspaceProps.

Parameters:

  • alert_manager_definition (String, nil) (defaults to: nil)

    The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.

  • _alias (String, nil) (defaults to: nil)

    The alias that is assigned to this workspace to help identify it.

  • kms_key_arn (String, nil) (defaults to: nil)

    (optional) The ARN for a customer managed AWS key to use for encrypting data within your workspace.

  • logging_configuration (AWSCDK::IResolvable, AWSCDK::APS::CfnWorkspace::LoggingConfigurationProperty, nil) (defaults to: nil)

    Contains information about the logging configuration for the workspace.

  • query_logging_configuration (AWSCDK::IResolvable, AWSCDK::APS::CfnWorkspace::QueryLoggingConfigurationProperty, nil) (defaults to: nil)

    The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.

  • tags (Array<AWSCDK::CfnTag>, nil) (defaults to: nil)

    The list of tag keys and values that are associated with the workspace.

  • workspace_configuration (AWSCDK::IResolvable, AWSCDK::APS::CfnWorkspace::WorkspaceConfigurationProperty, nil) (defaults to: nil)

    Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# File 'aps/cfn_workspace_props.rb', line 16

def initialize(alert_manager_definition: nil, _alias: nil, kms_key_arn: nil, logging_configuration: nil, query_logging_configuration: nil, tags: nil, workspace_configuration: nil)
  @alert_manager_definition = alert_manager_definition
  Jsii::Type.check_type(@alert_manager_definition, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alertManagerDefinition") unless @alert_manager_definition.nil?
  @_alias = _alias
  Jsii::Type.check_type(@_alias, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "alias") unless @_alias.nil?
  @kms_key_arn = kms_key_arn
  Jsii::Type.check_type(@kms_key_arn, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "kmsKeyArn") unless @kms_key_arn.nil?
  @logging_configuration = logging_configuration.is_a?(Hash) ? ::AWSCDK::APS::CfnWorkspace::LoggingConfigurationProperty.new(**logging_configuration.transform_keys(&:to_sym)) : logging_configuration
  Jsii::Type.check_type(@logging_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuV29ya3NwYWNlLkxvZ2dpbmdDb25maWd1cmF0aW9uUHJvcGVydHkifV19fQ==")), "loggingConfiguration") unless @logging_configuration.nil?
  @query_logging_configuration = query_logging_configuration.is_a?(Hash) ? ::AWSCDK::APS::CfnWorkspace::QueryLoggingConfigurationProperty.new(**query_logging_configuration.transform_keys(&:to_sym)) : query_logging_configuration
  Jsii::Type.check_type(@query_logging_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuV29ya3NwYWNlLlF1ZXJ5TG9nZ2luZ0NvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "queryLoggingConfiguration") unless @query_logging_configuration.nil?
  @tags = tags.is_a?(Array) ? tags.map { |jsii_v0| jsii_v0.is_a?(Hash) ? ::AWSCDK::CfnTag.new(**jsii_v0.transform_keys(&:to_sym)) : jsii_v0 } : tags
  Jsii::Type.check_type(@tags, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLkNmblRhZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "tags") unless @tags.nil?
  @workspace_configuration = workspace_configuration.is_a?(Hash) ? ::AWSCDK::APS::CfnWorkspace::WorkspaceConfigurationProperty.new(**workspace_configuration.transform_keys(&:to_sym)) : workspace_configuration
  Jsii::Type.check_type(@workspace_configuration, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3siZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifSx7ImZxbiI6ImF3cy1jZGstbGliLmF3c19hcHMuQ2ZuV29ya3NwYWNlLldvcmtzcGFjZUNvbmZpZ3VyYXRpb25Qcm9wZXJ0eSJ9XX19")), "workspaceConfiguration") unless @workspace_configuration.nil?
end

Instance Attribute Details

#_aliasString? (readonly)

The alias that is assigned to this workspace to help identify it.

It does not need to be unique.



50
51
52
# File 'aps/cfn_workspace_props.rb', line 50

def _alias
  @_alias
end

#alert_manager_definitionString? (readonly)

The alert manager definition, a YAML configuration for the alert manager in your Amazon Managed Service for Prometheus workspace.

For details about the alert manager definition, see Creating an alert manager configuration files in the Amazon Managed Service for Prometheus User Guide .

The following example shows part of a CloudFormation YAML file with an embedded alert manager definition (following the - |- ).

Workspace: Type: AWS::APS::Workspace .... Properties: .... AlertManagerDefinition: Fn::Sub: - |- alertmanager_config: | templates: - 'default_template' route: receiver: example-sns receivers: - name: example-sns sns_configs: - topic_arn: 'arn:aws:sns:${AWS::Region}:${AWS::AccountId}:${TopicName}' -



43
44
45
# File 'aps/cfn_workspace_props.rb', line 43

def alert_manager_definition
  @alert_manager_definition
end

#kms_key_arnString? (readonly)

(optional) The ARN for a customer managed AWS key to use for encrypting data within your workspace.

For more information about using your own key in your workspace, see Encryption at rest in the Amazon Managed Service for Prometheus User Guide .



57
58
59
# File 'aps/cfn_workspace_props.rb', line 57

def kms_key_arn
  @kms_key_arn
end

#logging_configurationAWSCDK::IResolvable, ... (readonly)

Contains information about the logging configuration for the workspace.



62
63
64
# File 'aps/cfn_workspace_props.rb', line 62

def logging_configuration
  @logging_configuration
end

#query_logging_configurationAWSCDK::IResolvable, ... (readonly)

The definition of logging configuration in an Amazon Managed Service for Prometheus workspace.



67
68
69
# File 'aps/cfn_workspace_props.rb', line 67

def query_logging_configuration
  @query_logging_configuration
end

#tagsArray<AWSCDK::CfnTag>? (readonly)

The list of tag keys and values that are associated with the workspace.



72
73
74
# File 'aps/cfn_workspace_props.rb', line 72

def tags
  @tags
end

#workspace_configurationAWSCDK::IResolvable, ... (readonly)

Use this structure to define label sets and the ingestion limits for time series that match label sets, and to specify the retention period of the workspace.



77
78
79
# File 'aps/cfn_workspace_props.rb', line 77

def workspace_configuration
  @workspace_configuration
end

Class Method Details

.jsii_propertiesObject



79
80
81
82
83
84
85
86
87
88
89
# File 'aps/cfn_workspace_props.rb', line 79

def self.jsii_properties
  {
    :alert_manager_definition => "alertManagerDefinition",
    :_alias => "alias",
    :kms_key_arn => "kmsKeyArn",
    :logging_configuration => "loggingConfiguration",
    :query_logging_configuration => "queryLoggingConfiguration",
    :tags => "tags",
    :workspace_configuration => "workspaceConfiguration",
  }
end

Instance Method Details

#to_jsiiObject



91
92
93
94
95
96
97
98
99
100
101
102
103
# File 'aps/cfn_workspace_props.rb', line 91

def to_jsii
  result = {}
  result.merge!({
    "alertManagerDefinition" => @alert_manager_definition,
    "alias" => @_alias,
    "kmsKeyArn" => @kms_key_arn,
    "loggingConfiguration" => @logging_configuration,
    "queryLoggingConfiguration" => @query_logging_configuration,
    "tags" => @tags,
    "workspaceConfiguration" => @workspace_configuration,
  })
  result.compact
end