Class: Aws::CodeStarNotifications::Types::CreateNotificationRuleRequest

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-codestarnotifications/lib/aws-sdk-codestarnotifications/types.rb

Overview

Note:

When making an API call, you may pass CreateNotificationRuleRequest data as a hash:

{
  name: "NotificationRuleName", # required
  event_type_ids: ["EventTypeId"], # required
  resource: "NotificationRuleResource", # required
  targets: [ # required
    {
      target_type: "TargetType",
      target_address: "TargetAddress",
    },
  ],
  detail_type: "BASIC", # required, accepts BASIC, FULL
  client_request_token: "ClientRequestToken",
  tags: {
    "TagKey" => "TagValue",
  },
  status: "ENABLED", # accepts ENABLED, DISABLED
}

Constant Summary collapse

SENSITIVE =
[:name]

Instance Attribute Summary collapse

Instance Attribute Details

#client_request_tokenString

A unique, client-generated idempotency token that, when provided in a request, ensures the request cannot be repeated with a changed parameter. If a request with the same parameters is received and a token is included, the request returns information about the initial request that used that token.

The AWS SDKs prepopulate client request tokens. If you are using an AWS SDK, an idempotency token is created for you.

A suitable default value is auto-generated. You should normally not need to pass this option.

Returns:

  • (String)


135
136
137
138
139
140
141
142
143
144
145
146
# File 'gems/aws-sdk-codestarnotifications/lib/aws-sdk-codestarnotifications/types.rb', line 135

class CreateNotificationRuleRequest < Struct.new(
  :name,
  :event_type_ids,
  :resource,
  :targets,
  :detail_type,
  :client_request_token,
  :tags,
  :status)
  SENSITIVE = [:name]
  include Aws::Structure
end

#detail_typeString

The level of detail to include in the notifications for this resource. BASIC will include only the contents of the event as it would appear in AWS CloudWatch. FULL will include any supplemental information provided by AWS CodeStar Notifications and/or the service for the resource for which the notification is created.

Returns:

  • (String)


135
136
137
138
139
140
141
142
143
144
145
146
# File 'gems/aws-sdk-codestarnotifications/lib/aws-sdk-codestarnotifications/types.rb', line 135

class CreateNotificationRuleRequest < Struct.new(
  :name,
  :event_type_ids,
  :resource,
  :targets,
  :detail_type,
  :client_request_token,
  :tags,
  :status)
  SENSITIVE = [:name]
  include Aws::Structure
end

#event_type_idsArray<String>

A list of event types associated with this notification rule. For a list of allowed events, see EventTypeSummary.

Returns:

  • (Array<String>)


135
136
137
138
139
140
141
142
143
144
145
146
# File 'gems/aws-sdk-codestarnotifications/lib/aws-sdk-codestarnotifications/types.rb', line 135

class CreateNotificationRuleRequest < Struct.new(
  :name,
  :event_type_ids,
  :resource,
  :targets,
  :detail_type,
  :client_request_token,
  :tags,
  :status)
  SENSITIVE = [:name]
  include Aws::Structure
end

#nameString

The name for the notification rule. Notifictaion rule names must be unique in your AWS account.

Returns:

  • (String)


135
136
137
138
139
140
141
142
143
144
145
146
# File 'gems/aws-sdk-codestarnotifications/lib/aws-sdk-codestarnotifications/types.rb', line 135

class CreateNotificationRuleRequest < Struct.new(
  :name,
  :event_type_ids,
  :resource,
  :targets,
  :detail_type,
  :client_request_token,
  :tags,
  :status)
  SENSITIVE = [:name]
  include Aws::Structure
end

#resourceString

The Amazon Resource Name (ARN) of the resource to associate with the notification rule. Supported resources include pipelines in AWS CodePipeline, repositories in AWS CodeCommit, and build projects in AWS CodeBuild.

Returns:

  • (String)


135
136
137
138
139
140
141
142
143
144
145
146
# File 'gems/aws-sdk-codestarnotifications/lib/aws-sdk-codestarnotifications/types.rb', line 135

class CreateNotificationRuleRequest < Struct.new(
  :name,
  :event_type_ids,
  :resource,
  :targets,
  :detail_type,
  :client_request_token,
  :tags,
  :status)
  SENSITIVE = [:name]
  include Aws::Structure
end

#statusString

The status of the notification rule. The default value is ENABLED. If the status is set to DISABLED, notifications aren't sent for the notification rule.

Returns:

  • (String)


135
136
137
138
139
140
141
142
143
144
145
146
# File 'gems/aws-sdk-codestarnotifications/lib/aws-sdk-codestarnotifications/types.rb', line 135

class CreateNotificationRuleRequest < Struct.new(
  :name,
  :event_type_ids,
  :resource,
  :targets,
  :detail_type,
  :client_request_token,
  :tags,
  :status)
  SENSITIVE = [:name]
  include Aws::Structure
end

#tagsHash<String,String>

A list of tags to apply to this notification rule. Key names cannot start with "aws".

Returns:

  • (Hash<String,String>)


135
136
137
138
139
140
141
142
143
144
145
146
# File 'gems/aws-sdk-codestarnotifications/lib/aws-sdk-codestarnotifications/types.rb', line 135

class CreateNotificationRuleRequest < Struct.new(
  :name,
  :event_type_ids,
  :resource,
  :targets,
  :detail_type,
  :client_request_token,
  :tags,
  :status)
  SENSITIVE = [:name]
  include Aws::Structure
end

#targetsArray<Types::Target>

A list of Amazon Resource Names (ARNs) of SNS topics to associate with the notification rule.

Returns:



135
136
137
138
139
140
141
142
143
144
145
146
# File 'gems/aws-sdk-codestarnotifications/lib/aws-sdk-codestarnotifications/types.rb', line 135

class CreateNotificationRuleRequest < Struct.new(
  :name,
  :event_type_ids,
  :resource,
  :targets,
  :detail_type,
  :client_request_token,
  :tags,
  :status)
  SENSITIVE = [:name]
  include Aws::Structure
end