Skip to content

Commit 9367ed1

Browse files
author
AWS
committed
AWS Cost Explorer Service Update: Added three new APIs to support tagging and resource-level authorization on Cost Explorer resources: TagResource, UntagResource, ListTagsForResource. Added optional parameters to CreateCostCategoryDefinition, CreateAnomalySubscription and CreateAnomalyMonitor APIs to support Tag On Create.
1 parent 3172fb6 commit 9367ed1

File tree

2 files changed

+180
-4
lines changed

2 files changed

+180
-4
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "feature",
3+
"category": "AWS Cost Explorer Service",
4+
"contributor": "",
5+
"description": "Added three new APIs to support tagging and resource-level authorization on Cost Explorer resources: TagResource, UntagResource, ListTagsForResource. Added optional parameters to CreateCostCategoryDefinition, CreateAnomalySubscription and CreateAnomalyMonitor APIs to support Tag On Create."
6+
}

services/costexplorer/src/main/resources/codegen-resources/service-2.json

+174-4
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,20 @@
399399
],
400400
"documentation":"<p>Returns the name, ARN, <code>NumberOfRules</code> and effective dates of all Cost Categories defined in the account. You have the option to use <code>EffectiveOn</code> to return a list of Cost Categories that were active on a specific date. If there is no <code>EffectiveOn</code> specified, you’ll see Cost Categories that are effective on the current date. If Cost Category is still effective, <code>EffectiveEnd</code> is omitted in the response. <code>ListCostCategoryDefinitions</code> supports pagination. The request can have a <code>MaxResults</code> range up to 100.</p>"
401401
},
402+
"ListTagsForResource":{
403+
"name":"ListTagsForResource",
404+
"http":{
405+
"method":"POST",
406+
"requestUri":"/"
407+
},
408+
"input":{"shape":"ListTagsForResourceRequest"},
409+
"output":{"shape":"ListTagsForResourceResponse"},
410+
"errors":[
411+
{"shape":"ResourceNotFoundException"},
412+
{"shape":"LimitExceededException"}
413+
],
414+
"documentation":"<p>Returns a list of resource tags associated with the resource specified by the Amazon Resource Name (ARN). </p>"
415+
},
402416
"ProvideAnomalyFeedback":{
403417
"name":"ProvideAnomalyFeedback",
404418
"http":{
@@ -412,6 +426,35 @@
412426
],
413427
"documentation":"<p>Modifies the feedback property of a given cost anomaly. </p>"
414428
},
429+
"TagResource":{
430+
"name":"TagResource",
431+
"http":{
432+
"method":"POST",
433+
"requestUri":"/"
434+
},
435+
"input":{"shape":"TagResourceRequest"},
436+
"output":{"shape":"TagResourceResponse"},
437+
"errors":[
438+
{"shape":"ResourceNotFoundException"},
439+
{"shape":"TooManyTagsException"},
440+
{"shape":"LimitExceededException"}
441+
],
442+
"documentation":"<p>An API operation for adding one or more tags (key-value pairs) to a resource.</p> <p>You can use the <code>TagResource</code> operation with a resource that already has tags. If you specify a new tag key for the resource, this tag is appended to the list of tags associated with the resource. If you specify a tag key that is already associated with the resource, the new tag value you specify replaces the previous value for that tag.</p> <p> Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use.</p>"
443+
},
444+
"UntagResource":{
445+
"name":"UntagResource",
446+
"http":{
447+
"method":"POST",
448+
"requestUri":"/"
449+
},
450+
"input":{"shape":"UntagResourceRequest"},
451+
"output":{"shape":"UntagResourceResponse"},
452+
"errors":[
453+
{"shape":"ResourceNotFoundException"},
454+
{"shape":"LimitExceededException"}
455+
],
456+
"documentation":"<p> Removes one or more tags from a resource. Specify only tag key(s) in your request. Do not specify the value. </p>"
457+
},
415458
"UpdateAnomalyMonitor":{
416459
"name":"UpdateAnomalyMonitor",
417460
"http":{
@@ -424,7 +467,7 @@
424467
{"shape":"LimitExceededException"},
425468
{"shape":"UnknownMonitorException"}
426469
],
427-
"documentation":"<p>Updates an existing cost anomaly monitor. The changes made are applied going forward, and doesn'tt change anomalies detected in the past. </p>"
470+
"documentation":"<p>Updates an existing cost anomaly monitor. The changes made are applied going forward, and doesn't change anomalies detected in the past. </p>"
428471
},
429472
"UpdateAnomalySubscription":{
430473
"name":"UpdateAnomalySubscription",
@@ -1078,6 +1121,10 @@
10781121
"AnomalyMonitor":{
10791122
"shape":"AnomalyMonitor",
10801123
"documentation":"<p>The cost anomaly detection monitor object that you want to create.</p>"
1124+
},
1125+
"ResourceTags":{
1126+
"shape":"ResourceTagList",
1127+
"documentation":"<p> An optional list of tags to associate with the specified <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AnomalyMonitor.html\"> <code>AnomalyMonitor</code> </a>. You can use resource tags to control access to your monitor using IAM policies.</p> <p>Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:</p> <ul> <li> <p>Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use</p> </li> <li> <p>The maximum length of a key is 128 characters</p> </li> <li> <p>The maximum length of a value is 256 characters</p> </li> <li> <p>Valid characters for keys and values are: <code>A-Z</code>, <code>a-z</code>, spaces, <code>_.:/=+-</code> </p> </li> <li> <p>Keys and values are case sensitive</p> </li> <li> <p>Keys and values are trimmed for any leading or trailing whitespaces</p> </li> <li> <p>Don’t use <code>aws:</code> as a prefix for your keys. This prefix is reserved for Amazon Web Services use</p> </li> </ul>"
10811128
}
10821129
}
10831130
},
@@ -1098,6 +1145,10 @@
10981145
"AnomalySubscription":{
10991146
"shape":"AnomalySubscription",
11001147
"documentation":"<p>The cost anomaly subscription object that you want to create. </p>"
1148+
},
1149+
"ResourceTags":{
1150+
"shape":"ResourceTagList",
1151+
"documentation":"<p> An optional list of tags to associate with the specified <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AnomalySubscription.html\"> <code>AnomalySubscription</code> </a>. You can use resource tags to control access to your <code>subscription</code> using IAM policies.</p> <p>Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:</p> <ul> <li> <p>Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use</p> </li> <li> <p>The maximum length of a key is 128 characters</p> </li> <li> <p>The maximum length of a value is 256 characters</p> </li> <li> <p>Valid characters for keys and values are: <code>A-Z</code>, <code>a-z</code>, spaces, <code>_.:/=+-</code> </p> </li> <li> <p>Keys and values are case sensitive</p> </li> <li> <p>Keys and values are trimmed for any leading or trailing whitespaces</p> </li> <li> <p>Don’t use <code>aws:</code> as a prefix for your keys. This prefix is reserved for Amazon Web Services use</p> </li> </ul>"
11011152
}
11021153
}
11031154
},
@@ -1129,6 +1180,10 @@
11291180
"SplitChargeRules":{
11301181
"shape":"CostCategorySplitChargeRulesList",
11311182
"documentation":"<p> The split charge rules used to allocate your charges between your Cost Category values. </p>"
1183+
},
1184+
"ResourceTags":{
1185+
"shape":"ResourceTagList",
1186+
"documentation":"<p> An optional list of tags to associate with the specified <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategory.html\"> <code>CostCategory</code> </a>. You can use resource tags to control access to your <code>cost category</code> using IAM policies.</p> <p>Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:</p> <ul> <li> <p>Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use</p> </li> <li> <p>The maximum length of a key is 128 characters</p> </li> <li> <p>The maximum length of a value is 256 characters</p> </li> <li> <p>Valid characters for keys and values are: <code>A-Z</code>, <code>a-z</code>, spaces, <code>_.:/=+-</code> </p> </li> <li> <p>Keys and values are case sensitive</p> </li> <li> <p>Keys and values are trimmed for any leading or trailing whitespaces</p> </li> <li> <p>Don’t use <code>aws:</code> as a prefix for your keys. This prefix is reserved for Amazon Web Services use</p> </li> </ul>"
11321187
}
11331188
}
11341189
},
@@ -1811,7 +1866,7 @@
18111866
},
18121867
"Filter":{
18131868
"shape":"Expression",
1814-
"documentation":"<p>Filters Amazon Web Services costs by different dimensions. For example, you can specify <code>SERVICE</code> and <code>LINKED_ACCOUNT</code> and get the costs that are associated with that account's usage of that service. You can nest <code>Expression</code> objects to define any combination of dimension filters. For more information, see <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html\">Expression</a>. </p> <p>Valid values for <code>MatchOptions</code> for <code>CostCategories</code> and <code>Tags</code> are <code>EQUALS</code>, <code>ABSENT</code>, and <code>CASE_SENSITIVE</code>.</p> <p>The default values are <code>EQUALS</code> and <code>CASE_SENSITIVE</code>. Valid values for <code>MatchOptions</code> for <code>Dimensions</code> are <code>EQUALS</code> and <code>CASE_SENSITIVE</code>.</p>"
1869+
"documentation":"<p>Filters Amazon Web Services costs by different dimensions. For example, you can specify <code>SERVICE</code> and <code>LINKED_ACCOUNT</code> and get the costs that are associated with that account's usage of that service. You can nest <code>Expression</code> objects to define any combination of dimension filters. For more information, see <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html\">Expression</a>. </p> <p>Valid values for <code>MatchOptions</code> for <code>Dimensions</code> are <code>EQUALS</code> and <code>CASE_SENSITIVE</code>.</p> <p>Valid values for <code>MatchOptions</code> for <code>CostCategories</code> and <code>Tags</code> are <code>EQUALS</code>, <code>ABSENT</code>, and <code>CASE_SENSITIVE</code>. Default values are <code>EQUALS</code> and <code>CASE_SENSITIVE</code>.</p>"
18151870
},
18161871
"Metrics":{
18171872
"shape":"MetricNames",
@@ -1866,7 +1921,7 @@
18661921
},
18671922
"Filter":{
18681923
"shape":"Expression",
1869-
"documentation":"<p>Filters Amazon Web Services costs by different dimensions. For example, you can specify <code>SERVICE</code> and <code>LINKED_ACCOUNT</code> and get the costs that are associated with that account's usage of that service. You can nest <code>Expression</code> objects to define any combination of dimension filters. For more information, see <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html\">Expression</a>. </p> <p>The <code>GetCostAndUsageWithResources</code> operation requires that you either group by or filter by a <code>ResourceId</code>. It requires the <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html\">Expression</a> <code>\"SERVICE = Amazon Elastic Compute Cloud - Compute\"</code> in the filter.</p> <p>Valid values for <code>MatchOptions</code> for <code>CostCategories</code> and <code>Tags</code> are <code>EQUALS</code>, <code>ABSENT</code>, and <code>CASE_SENSITIVE</code>.</p> <p>The default values are <code>EQUALS</code> and <code>CASE_SENSITIVE</code>. Valid values for <code>MatchOptions</code> for <code>Dimensions</code> are <code>EQUALS</code> and <code>CASE_SENSITIVE</code>.</p>"
1924+
"documentation":"<p>Filters Amazon Web Services costs by different dimensions. For example, you can specify <code>SERVICE</code> and <code>LINKED_ACCOUNT</code> and get the costs that are associated with that account's usage of that service. You can nest <code>Expression</code> objects to define any combination of dimension filters. For more information, see <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html\">Expression</a>. </p> <p>The <code>GetCostAndUsageWithResources</code> operation requires that you either group by or filter by a <code>ResourceId</code>. It requires the <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_Expression.html\">Expression</a> <code>\"SERVICE = Amazon Elastic Compute Cloud - Compute\"</code> in the filter.</p> <p>Valid values for <code>MatchOptions</code> for <code>Dimensions</code> are <code>EQUALS</code> and <code>CASE_SENSITIVE</code>.</p> <p>Valid values for <code>MatchOptions</code> for <code>CostCategories</code> and <code>Tags</code> are <code>EQUALS</code>, <code>ABSENT</code>, and <code>CASE_SENSITIVE</code>. Default values are <code>EQUALS</code> and <code>CASE_SENSITIVE</code>.</p>"
18701925
},
18711926
"Metrics":{
18721927
"shape":"MetricNames",
@@ -2736,6 +2791,25 @@
27362791
}
27372792
}
27382793
},
2794+
"ListTagsForResourceRequest":{
2795+
"type":"structure",
2796+
"required":["ResourceArn"],
2797+
"members":{
2798+
"ResourceArn":{
2799+
"shape":"Arn",
2800+
"documentation":"<p>The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_ResourceTag.html\">ResourceTag</a>.</p>"
2801+
}
2802+
}
2803+
},
2804+
"ListTagsForResourceResponse":{
2805+
"type":"structure",
2806+
"members":{
2807+
"ResourceTags":{
2808+
"shape":"ResourceTagList",
2809+
"documentation":"<p>A list of tag key value pairs that are associated with the response. </p>"
2810+
}
2811+
}
2812+
},
27392813
"LookbackPeriodInDays":{
27402814
"type":"string",
27412815
"enum":[
@@ -3327,11 +3401,54 @@
33273401
"ResourceNotFoundException":{
33283402
"type":"structure",
33293403
"members":{
3330-
"Message":{"shape":"ErrorMessage"}
3404+
"Message":{"shape":"ErrorMessage"},
3405+
"ResourceName":{"shape":"Arn"}
33313406
},
33323407
"documentation":"<p> The specified ARN in the request doesn't exist. </p>",
33333408
"exception":true
33343409
},
3410+
"ResourceTag":{
3411+
"type":"structure",
3412+
"required":[
3413+
"Key",
3414+
"Value"
3415+
],
3416+
"members":{
3417+
"Key":{
3418+
"shape":"ResourceTagKey",
3419+
"documentation":"<p> The key that is associated with the tag. </p>"
3420+
},
3421+
"Value":{
3422+
"shape":"ResourceTagValue",
3423+
"documentation":"<p> The value that is associated with the tag. </p>"
3424+
}
3425+
},
3426+
"documentation":"<p> The tag structure that contains a tag key and value. </p> <note> <p>Tagging is supported only for the following Cost Explorer resource types: <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AnomalyMonitor.html\"> <code>AnomalyMonitor</code> </a>, <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_AnomalySubscription.html\"> <code>AnomalySubscription</code> </a>, <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_CostCategory.html\"> <code>CostCategory</code> </a>.</p> </note>"
3427+
},
3428+
"ResourceTagKey":{
3429+
"type":"string",
3430+
"max":128,
3431+
"min":1,
3432+
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
3433+
},
3434+
"ResourceTagKeyList":{
3435+
"type":"list",
3436+
"member":{"shape":"ResourceTagKey"},
3437+
"max":200,
3438+
"min":0
3439+
},
3440+
"ResourceTagList":{
3441+
"type":"list",
3442+
"member":{"shape":"ResourceTag"},
3443+
"max":200,
3444+
"min":0
3445+
},
3446+
"ResourceTagValue":{
3447+
"type":"string",
3448+
"max":256,
3449+
"min":0,
3450+
"pattern":"^([\\p{L}\\p{Z}\\p{N}_.:/=+\\-@]*)$"
3451+
},
33353452
"ResourceUtilization":{
33363453
"type":"structure",
33373454
"members":{
@@ -3992,6 +4109,28 @@
39924109
"type":"list",
39934110
"member":{"shape":"Entity"}
39944111
},
4112+
"TagResourceRequest":{
4113+
"type":"structure",
4114+
"required":[
4115+
"ResourceArn",
4116+
"ResourceTags"
4117+
],
4118+
"members":{
4119+
"ResourceArn":{
4120+
"shape":"Arn",
4121+
"documentation":"<p>The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_ResourceTag.html\">ResourceTag</a>. </p>"
4122+
},
4123+
"ResourceTags":{
4124+
"shape":"ResourceTagList",
4125+
"documentation":"<p> A list of tag key-value pairs to be added to the resource.</p> <p>Each tag consists of a key and a value, and each key must be unique for the resource. The following restrictions apply to resource tags:</p> <ul> <li> <p>Although the maximum number of array members is 200, you can assign a maximum of 50 user-tags to one resource. The remaining are reserved for Amazon Web Services use</p> </li> <li> <p>The maximum length of a key is 128 characters</p> </li> <li> <p>The maximum length of a value is 256 characters</p> </li> <li> <p>Valid characters for keys and values are: <code>A-Z</code>, <code>a-z</code>, spaces, <code>_.:/=+-</code> </p> </li> <li> <p>Keys and values are case sensitive</p> </li> <li> <p>Keys and values are trimmed for any leading or trailing whitespaces</p> </li> <li> <p>Don’t use <code>aws:</code> as a prefix for your keys. This prefix is reserved for Amazon Web Services use</p> </li> </ul>"
4126+
}
4127+
}
4128+
},
4129+
"TagResourceResponse":{
4130+
"type":"structure",
4131+
"members":{
4132+
}
4133+
},
39954134
"TagValues":{
39964135
"type":"structure",
39974136
"members":{
@@ -4073,6 +4212,15 @@
40734212
},
40744213
"documentation":"<p>Details on termination recommendation. </p>"
40754214
},
4215+
"TooManyTagsException":{
4216+
"type":"structure",
4217+
"members":{
4218+
"Message":{"shape":"ErrorMessage"},
4219+
"ResourceName":{"shape":"Arn"}
4220+
},
4221+
"documentation":"<p>Can occur if you specify a number of tags for a resource greater than the maximum 50 user tags per resource.</p>",
4222+
"exception":true
4223+
},
40764224
"TotalActualHours":{"type":"string"},
40774225
"TotalActualUnits":{"type":"string"},
40784226
"TotalAmortizedFee":{"type":"string"},
@@ -4126,6 +4274,28 @@
41264274
"documentation":"<p>Cost Explorer was unable to identify the usage unit. Provide <code>UsageType/UsageTypeGroup</code> filter selections that contain matching units, for example: <code>hours</code>.</p>",
41274275
"exception":true
41284276
},
4277+
"UntagResourceRequest":{
4278+
"type":"structure",
4279+
"required":[
4280+
"ResourceArn",
4281+
"ResourceTagKeys"
4282+
],
4283+
"members":{
4284+
"ResourceArn":{
4285+
"shape":"Arn",
4286+
"documentation":"<p> The Amazon Resource Name (ARN) of the resource. For a list of supported resources, see <a href=\"https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_ResourceTag.html\">ResourceTag</a>. </p>"
4287+
},
4288+
"ResourceTagKeys":{
4289+
"shape":"ResourceTagKeyList",
4290+
"documentation":"<p> A list of tag keys associated with tags that need to be removed from the resource. If you specify a tag key that does not exist, it is ignored. Although the maximum number of array members is 200, user-tag maximum is 50. The remaining are reserved for Amazon Web Services use. </p>"
4291+
}
4292+
}
4293+
},
4294+
"UntagResourceResponse":{
4295+
"type":"structure",
4296+
"members":{
4297+
}
4298+
},
41294299
"UnusedHours":{"type":"string"},
41304300
"UnusedUnits":{"type":"string"},
41314301
"UpdateAnomalyMonitorRequest":{

0 commit comments

Comments
 (0)