Interface TagResourceRequest.Builder

    • Method Detail

      • resourceARN

        TagResourceRequest.Builder resourceARN​(String resourceARN)

        The ARN of the CloudWatch resource that you're adding tags to.

        The ARN format of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name

        The ARN format of a Contributor Insights rule is arn:aws:cloudwatch:Region:account-id:insight-rule/insight-rule-name

        For more information about ARN format, see Resource Types Defined by Amazon CloudWatch in the Amazon Web Services General Reference.

        Parameters:
        resourceARN - The ARN of the CloudWatch resource that you're adding tags to.

        The ARN format of an alarm is arn:aws:cloudwatch:Region:account-id:alarm:alarm-name

        The ARN format of a Contributor Insights rule is arn:aws:cloudwatch:Region:account-id:insight-rule/insight-rule-name

        For more information about ARN format, see Resource Types Defined by Amazon CloudWatch in the Amazon Web Services General Reference.

        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tags

        TagResourceRequest.Builder tags​(Collection<Tag> tags)

        The list of key-value pairs to associate with the alarm.

        Parameters:
        tags - The list of key-value pairs to associate with the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tags

        TagResourceRequest.Builder tags​(Tag... tags)

        The list of key-value pairs to associate with the alarm.

        Parameters:
        tags - The list of key-value pairs to associate with the alarm.
        Returns:
        Returns a reference to this object so that method calls can be chained together.
      • tags

        TagResourceRequest.Builder tags​(Consumer<Tag.Builder>... tags)

        The list of key-value pairs to associate with the alarm.

        This is a convenience method that creates an instance of the Tag.Builder avoiding the need to create one manually via Tag.builder().

        When the Consumer completes, SdkBuilder.build() is called immediately and its result is passed to #tags(List).

        Parameters:
        tags - a consumer that will call methods on Tag.Builder
        Returns:
        Returns a reference to this object so that method calls can be chained together.
        See Also:
        #tags(java.util.Collection)