AWS SDK Version 3 for .NET
API Reference

AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

Container for the parameters to the ChangeTagsForResource operation. Adds, edits, or deletes tags for a health check or a hosted zone.

For information about using tags for cost allocation, see Using Cost Allocation Tags in the AWS Billing and Cost Management User Guide.

Inheritance Hierarchy

System.Object
  Amazon.Runtime.AmazonWebServiceRequest
    Amazon.Route53.AmazonRoute53Request
      Amazon.Route53.Model.ChangeTagsForResourceRequest

Namespace: Amazon.Route53.Model
Assembly: AWSSDK.Route53.dll
Version: 3.x.y.z

Syntax

C#
public class ChangeTagsForResourceRequest : AmazonRoute53Request
         IAmazonWebServiceRequest

The ChangeTagsForResourceRequest type exposes the following members

Constructors

Properties

NameTypeDescription
Public Property AddTags System.Collections.Generic.List<Amazon.Route53.Model.Tag>

Gets and sets the property AddTags.

A complex type that contains a list of the tags that you want to add to the specified health check or hosted zone and/or the tags that you want to edit Value for.

You can add a maximum of 10 tags to a health check or a hosted zone.

Public Property RemoveTagKeys System.Collections.Generic.List<System.String>

Gets and sets the property RemoveTagKeys.

A complex type that contains a list of the tags that you want to delete from the specified health check or hosted zone. You can specify up to 10 keys.

Public Property ResourceId System.String

Gets and sets the property ResourceId.

The ID of the resource for which you want to add, change, or delete tags.

Public Property ResourceType Amazon.Route53.TagResourceType

Gets and sets the property ResourceType.

The type of the resource.

  • The resource type for health checks is healthcheck.

  • The resource type for hosted zones is hostedzone.

Examples

The following example adds two tags and removes one tag from the hosted zone with ID Z3M3LMPEXAMPLE.

To add or remove tags from a hosted zone or health check


var response = client.ChangeTagsForResource(new ChangeTagsForResourceRequest 
{
    AddTags = new List {
        new Tag {
            Key = "apex",
            Value = "3874"
        },
        new Tag {
            Key = "acme",
            Value = "4938"
        }
    },
    RemoveTagKeys = new List {
        "Nadir"
    },
    ResourceId = "Z3M3LMPEXAMPLE",
    ResourceType = "hostedzone" // Valid values are healthcheck and hostedzone.
});


            

Version Information

.NET Standard:
Supported in: 1.3

.NET Framework:
Supported in: 4.5, 4.0, 3.5

Portable Class Library:
Supported in: Windows Store Apps
Supported in: Windows Phone 8.1
Supported in: Xamarin Android
Supported in: Xamarin iOS (Unified)
Supported in: Xamarin.Forms