22package client
33
44import (
5- gatewayclient "github.com/alibabacloud-go/alibabacloud-gateway-pop/client"
65 openapi "github.com/alibabacloud-go/darabonba-openapi/v2/client"
76 endpointutil "github.com/alibabacloud-go/endpoint-util/service"
87 openapiutil "github.com/alibabacloud-go/openapi-util/service"
@@ -597,9 +596,9 @@ type CreateTagsRequestTagKeyValueParamList struct {
597596 //
598597 // Business environment
599598 Description * string `json:"Description,omitempty" xml:"Description,omitempty"`
600- // The key of tag N.
599+ // The value of tag N.
601600 //
602- // The tag key can be up to 128 characters in length and cannot contain `http:// ` or `https:// `. The tag key cannot start with `acs: ` or `aliyun `.
601+ // The tag value can be up to 128 characters in length and cannot start with `acs: ` or `aliyun `. The tag key cannot contain `http:// ` or `https:// `.
603602 //
604603 // Valid values of N: 1 to 10.
605604 //
@@ -609,7 +608,7 @@ type CreateTagsRequestTagKeyValueParamList struct {
609608 //
610609 // Environment
611610 Key * string `json:"Key,omitempty" xml:"Key,omitempty"`
612- // The information about the tag value .
611+ // The information about the tag values .
613612 TagValueParamList []* CreateTagsRequestTagKeyValueParamListTagValueParamList `json:"TagValueParamList,omitempty" xml:"TagValueParamList,omitempty" type:"Repeated"`
614613}
615614
@@ -1886,8 +1885,9 @@ type GetEffectivePolicyRequest struct {
18861885 // example:
18871886 //
18881887 // cn-shanghai
1889- RegionId * string `json:"RegionId,omitempty" xml:"RegionId,omitempty"`
1890- ResourceOwnerAccount * string `json:"ResourceOwnerAccount,omitempty" xml:"ResourceOwnerAccount,omitempty"`
1888+ RegionId * string `json:"RegionId,omitempty" xml:"RegionId,omitempty"`
1889+ ResourceOwnerAccount * string `json:"ResourceOwnerAccount,omitempty" xml:"ResourceOwnerAccount,omitempty"`
1890+ TagKeys []* string `json:"TagKeys,omitempty" xml:"TagKeys,omitempty" type:"Repeated"`
18911891 // The ID of the object.
18921892 //
18931893 // > If you use the Tag Policy feature in single-account mode, this parameter is optional. If you use the Tag Policy feature in multi-account mode, this feature is required.
@@ -1942,6 +1942,11 @@ func (s *GetEffectivePolicyRequest) SetResourceOwnerAccount(v string) *GetEffect
19421942 return s
19431943}
19441944
1945+ func (s * GetEffectivePolicyRequest ) SetTagKeys (v []* string ) * GetEffectivePolicyRequest {
1946+ s .TagKeys = v
1947+ return s
1948+ }
1949+
19451950func (s * GetEffectivePolicyRequest ) SetTargetId (v string ) * GetEffectivePolicyRequest {
19461951 s .TargetId = & v
19471952 return s
@@ -1958,7 +1963,8 @@ type GetEffectivePolicyResponseBody struct {
19581963 // example:
19591964 //
19601965 // {\\"tags\\":{\\"costcenter\\":{\\"tag_value\\":[\\"Beijing\\",\\"Shanghai\\"],\\"tag_key\\":\\"CostCenter\\"}}}
1961- EffectivePolicy * string `json:"EffectivePolicy,omitempty" xml:"EffectivePolicy,omitempty"`
1966+ EffectivePolicy * string `json:"EffectivePolicy,omitempty" xml:"EffectivePolicy,omitempty"`
1967+ PolicyAttachments []* GetEffectivePolicyResponseBodyPolicyAttachments `json:"PolicyAttachments,omitempty" xml:"PolicyAttachments,omitempty" type:"Repeated"`
19621968 // The ID of the request.
19631969 //
19641970 // example:
@@ -1980,11 +1986,92 @@ func (s *GetEffectivePolicyResponseBody) SetEffectivePolicy(v string) *GetEffect
19801986 return s
19811987}
19821988
1989+ func (s * GetEffectivePolicyResponseBody ) SetPolicyAttachments (v []* GetEffectivePolicyResponseBodyPolicyAttachments ) * GetEffectivePolicyResponseBody {
1990+ s .PolicyAttachments = v
1991+ return s
1992+ }
1993+
19831994func (s * GetEffectivePolicyResponseBody ) SetRequestId (v string ) * GetEffectivePolicyResponseBody {
19841995 s .RequestId = & v
19851996 return s
19861997}
19871998
1999+ type GetEffectivePolicyResponseBodyPolicyAttachments struct {
2000+ PolicyList []* GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList `json:"PolicyList,omitempty" xml:"PolicyList,omitempty" type:"Repeated"`
2001+ PolicyType * string `json:"PolicyType,omitempty" xml:"PolicyType,omitempty"`
2002+ TagKey * string `json:"TagKey,omitempty" xml:"TagKey,omitempty"`
2003+ }
2004+
2005+ func (s GetEffectivePolicyResponseBodyPolicyAttachments ) String () string {
2006+ return tea .Prettify (s )
2007+ }
2008+
2009+ func (s GetEffectivePolicyResponseBodyPolicyAttachments ) GoString () string {
2010+ return s .String ()
2011+ }
2012+
2013+ func (s * GetEffectivePolicyResponseBodyPolicyAttachments ) SetPolicyList (v []* GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList ) * GetEffectivePolicyResponseBodyPolicyAttachments {
2014+ s .PolicyList = v
2015+ return s
2016+ }
2017+
2018+ func (s * GetEffectivePolicyResponseBodyPolicyAttachments ) SetPolicyType (v string ) * GetEffectivePolicyResponseBodyPolicyAttachments {
2019+ s .PolicyType = & v
2020+ return s
2021+ }
2022+
2023+ func (s * GetEffectivePolicyResponseBodyPolicyAttachments ) SetTagKey (v string ) * GetEffectivePolicyResponseBodyPolicyAttachments {
2024+ s .TagKey = & v
2025+ return s
2026+ }
2027+
2028+ type GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList struct {
2029+ AttachSeq * int32 `json:"AttachSeq,omitempty" xml:"AttachSeq,omitempty"`
2030+ AttachTime * string `json:"AttachTime,omitempty" xml:"AttachTime,omitempty"`
2031+ PolicyId * string `json:"PolicyId,omitempty" xml:"PolicyId,omitempty"`
2032+ PolicyName * string `json:"PolicyName,omitempty" xml:"PolicyName,omitempty"`
2033+ TargetId * string `json:"TargetId,omitempty" xml:"TargetId,omitempty"`
2034+ TargetType * string `json:"TargetType,omitempty" xml:"TargetType,omitempty"`
2035+ }
2036+
2037+ func (s GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList ) String () string {
2038+ return tea .Prettify (s )
2039+ }
2040+
2041+ func (s GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList ) GoString () string {
2042+ return s .String ()
2043+ }
2044+
2045+ func (s * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList ) SetAttachSeq (v int32 ) * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList {
2046+ s .AttachSeq = & v
2047+ return s
2048+ }
2049+
2050+ func (s * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList ) SetAttachTime (v string ) * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList {
2051+ s .AttachTime = & v
2052+ return s
2053+ }
2054+
2055+ func (s * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList ) SetPolicyId (v string ) * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList {
2056+ s .PolicyId = & v
2057+ return s
2058+ }
2059+
2060+ func (s * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList ) SetPolicyName (v string ) * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList {
2061+ s .PolicyName = & v
2062+ return s
2063+ }
2064+
2065+ func (s * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList ) SetTargetId (v string ) * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList {
2066+ s .TargetId = & v
2067+ return s
2068+ }
2069+
2070+ func (s * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList ) SetTargetType (v string ) * GetEffectivePolicyResponseBodyPolicyAttachmentsPolicyList {
2071+ s .TargetType = & v
2072+ return s
2073+ }
2074+
19882075type GetEffectivePolicyResponse struct {
19892076 Headers map [string ]* string `json:"headers,omitempty" xml:"headers,omitempty"`
19902077 StatusCode * int32 `json:"statusCode,omitempty" xml:"statusCode,omitempty"`
@@ -3321,7 +3408,7 @@ type ListResourcesByTagRequestTagFilter struct {
33213408 Key * string `json:"Key,omitempty" xml:"Key,omitempty"`
33223409 // The tag value. This parameter specifies a filter condition for the query.
33233410 //
3324- // The tag value can be a maximum of 128 characters in length. It cannot contain `http://` or `https://`.
3411+ // The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`.
33253412 //
33263413 // example:
33273414 //
@@ -3666,6 +3753,11 @@ func (s *ListSupportResourceTypesResponseBody) SetSupportResourceTypes(v []*List
36663753}
36673754
36683755type ListSupportResourceTypesResponseBodySupportResourceTypes struct {
3756+ // The resource ARN template.
3757+ //
3758+ // example:
3759+ //
3760+ // acs:ecs:*:*:instance/${ResourceId}
36693761 ArnTemplate * string `json:"ArnTemplate,omitempty" xml:"ArnTemplate,omitempty"`
36703762 // The service code.
36713763 //
@@ -3804,11 +3896,9 @@ type ListTagKeysRequest struct {
38043896 Category * string `json:"Category,omitempty" xml:"Category,omitempty"`
38053897 // The type of the query. Valid values:
38063898 //
3807- // - EQUAL: exact match. This is the default value.
3899+ // - EQUAL (default) : exact match
38083900 //
3809- // - PREFIX: prefix-based fuzzy match.
3810- //
3811- // > This parameter is available only in the China (Shenzhen) and China (Hong Kong) regions.
3901+ // - PREFIX: prefix-based fuzzy match
38123902 //
38133903 // example:
38143904 //
@@ -3931,12 +4021,10 @@ func (s *ListTagKeysRequest) SetResourceType(v string) *ListTagKeysRequest {
39314021}
39324022
39334023type ListTagKeysRequestTagFilter struct {
3934- // The tag key.
4024+ // The tag key for a fuzzy query .
39354025 //
39364026 // This parameter is used together with the `FuzzyType` parameter.
39374027 //
3938- // > This parameter is available only in the China (Shenzhen) and China (Hong Kong) regions.
3939- //
39404028 // example:
39414029 //
39424030 // team
@@ -4371,11 +4459,9 @@ type ListTagValuesRequest struct {
43714459 TagFilter * ListTagValuesRequestTagFilter `json:"TagFilter,omitempty" xml:"TagFilter,omitempty" type:"Struct"`
43724460 // The type of the query. Valid values:
43734461 //
4374- // - EQUAL: exact match. This is the default value.
4462+ // - EQUAL (default) : exact match
43754463 //
4376- // - PREFIX: prefix-based fuzzy match.
4377- //
4378- // > This parameter is available only in the China (Shenzhen) and China (Hong Kong) regions.
4464+ // - PREFIX: prefix-based fuzzy match
43794465 //
43804466 // example:
43814467 //
@@ -4506,12 +4592,10 @@ func (s *ListTagValuesRequest) SetResourceType(v string) *ListTagValuesRequest {
45064592}
45074593
45084594type ListTagValuesRequestTagFilter struct {
4509- // The tag value.
4595+ // The tag value for a fuzzy query .
45104596 //
45114597 // This parameter is used together with the `FuzzyType` parameter.
45124598 //
4513- // > This parameter is available only in the China (Shenzhen) and China (Hong Kong) regions.
4514- //
45154599 // example:
45164600 //
45174601 // v1
@@ -5357,7 +5441,9 @@ type UntagResourcesRequest struct {
53575441 // arn:acs:vpc:cn-hangzhou:123456789****:vpc/vpc-bp19dd90tkt6tz7wu****
53585442 ResourceARN []* string `json:"ResourceARN,omitempty" xml:"ResourceARN,omitempty" type:"Repeated"`
53595443 ResourceOwnerAccount * string `json:"ResourceOwnerAccount,omitempty" xml:"ResourceOwnerAccount,omitempty"`
5360- // A tag key.
5444+ // The key of tag N.
5445+ //
5446+ // Valid values of N: 1 to 10.
53615447 //
53625448 // This parameter is required.
53635449 //
@@ -5563,54 +5649,39 @@ func (client *Client) Init(config *openapi.Config) (_err error) {
55635649 if _err != nil {
55645650 return _err
55655651 }
5566- client .ProductId = tea .String ("Tag" )
5567- gatewayClient , _err := gatewayclient .NewClient ()
5568- if _err != nil {
5569- return _err
5570- }
5571-
5572- client .Spi = gatewayClient
55735652 client .EndpointRule = tea .String ("regional" )
55745653 client .EndpointMap = map [string ]* string {
5575- "cn-qingdao" : tea .String ("tag.aliyuncs.com" ),
5576- "cn-beijing" : tea .String ("tag.aliyuncs.com" ),
5577- "cn-hangzhou" : tea .String ("tag.aliyuncs.com" ),
5578- "cn-shanghai" : tea .String ("tag.aliyuncs.com" ),
5579- "cn-shenzhen" : tea .String ("tag.aliyuncs.com" ),
5580- "cn-hongkong" : tea .String ("tag.aliyuncs.com" ),
5581- "ap-southeast-1" : tea .String ("tag.aliyuncs.com" ),
5582- "us-west-1" : tea .String ("tag.aliyuncs.com" ),
5583- "us-east-1" : tea .String ("tag.aliyuncs.com" ),
5584- "cn-hangzhou-finance" : tea .String ("tag.aliyuncs.com" ),
5654+ "us-west-1" : tea .String ("tag.us-east-1.aliyuncs.com" ),
5655+ "cn-hangzhou-finance" : tea .String ("tag.cn-hangzhou.aliyuncs.com" ),
55855656 "cn-shanghai-finance-1" : tea .String ("tag.aliyuncs.com" ),
55865657 "ap-northeast-2-pop" : tea .String ("tag.aliyuncs.com" ),
55875658 "cn-beijing-finance-pop" : tea .String ("tag.aliyuncs.com" ),
55885659 "cn-beijing-gov-1" : tea .String ("tag.aliyuncs.com" ),
5589- "cn-beijing-nu16-b01" : tea .String ("tag.aliyuncs.com" ),
5660+ "cn-beijing-nu16-b01" : tea .String ("tag.cn-hangzhou. aliyuncs.com" ),
55905661 "cn-edge-1" : tea .String ("tag.aliyuncs.com" ),
5591- "cn-fujian" : tea .String ("tag.aliyuncs.com" ),
5592- "cn-haidian-cm12-c01" : tea .String ("tag.aliyuncs.com" ),
5662+ "cn-fujian" : tea .String ("tag.cn-hangzhou. aliyuncs.com" ),
5663+ "cn-haidian-cm12-c01" : tea .String ("tag.cn-north-2-gov-1. aliyuncs.com" ),
55935664 "cn-hangzhou-bj-b01" : tea .String ("tag.aliyuncs.com" ),
55945665 "cn-hangzhou-internal-prod-1" : tea .String ("tag.aliyuncs.com" ),
55955666 "cn-hangzhou-internal-test-1" : tea .String ("tag.aliyuncs.com" ),
5596- "cn-hangzhou-internal-test-2" : tea .String ("tag.aliyuncs.com" ),
5597- "cn-hangzhou-internal-test-3" : tea .String ("tag.aliyuncs.com" ),
5598- "cn-hangzhou-test-306" : tea .String ("tag.aliyuncs.com" ),
5667+ "cn-hangzhou-internal-test-2" : tea .String ("tag.cn-hangzhou. aliyuncs.com" ),
5668+ "cn-hangzhou-internal-test-3" : tea .String ("tag.cn-hangzhou. aliyuncs.com" ),
5669+ "cn-hangzhou-test-306" : tea .String ("tag.cn-hangzhou. aliyuncs.com" ),
55995670 "cn-hongkong-finance-pop" : tea .String ("tag.aliyuncs.com" ),
5600- "cn-huhehaote-nebula-1" : tea .String ("tag.aliyuncs.com" ),
5601- "cn-shanghai-et15-b01" : tea .String ("tag.aliyuncs.com" ),
5671+ "cn-huhehaote-nebula-1" : tea .String ("tag.cn-qingdao-nebula. aliyuncs.com" ),
5672+ "cn-shanghai-et15-b01" : tea .String ("tag.cn-hangzhou. aliyuncs.com" ),
56025673 "cn-shanghai-et2-b01" : tea .String ("tag.aliyuncs.com" ),
56035674 "cn-shanghai-inner" : tea .String ("tag.aliyuncs.com" ),
56045675 "cn-shanghai-internal-test-1" : tea .String ("tag.aliyuncs.com" ),
56055676 "cn-shenzhen-inner" : tea .String ("tag.aliyuncs.com" ),
5606- "cn-shenzhen-st4-d01" : tea .String ("tag.aliyuncs.com" ),
5677+ "cn-shenzhen-st4-d01" : tea .String ("tag.cn-hangzhou. aliyuncs.com" ),
56075678 "cn-shenzhen-su18-b01" : tea .String ("tag.aliyuncs.com" ),
56085679 "cn-wuhan" : tea .String ("tag.aliyuncs.com" ),
56095680 "cn-yushanfang" : tea .String ("tag.aliyuncs.com" ),
56105681 "cn-zhangbei" : tea .String ("tag.aliyuncs.com" ),
5611- "cn-zhangbei-na61-b01" : tea .String ("tag.aliyuncs.com" ),
5682+ "cn-zhangbei-na61-b01" : tea .String ("tag.cn-hangzhou. aliyuncs.com" ),
56125683 "cn-zhangjiakou-na62-a01" : tea .String ("tag.aliyuncs.com" ),
5613- "cn-zhengzhou-nebula-1" : tea .String ("tag.aliyuncs.com" ),
5684+ "cn-zhengzhou-nebula-1" : tea .String ("tag.cn-qingdao-nebula. aliyuncs.com" ),
56145685 "eu-west-1-oxs" : tea .String ("tag.cn-shenzhen-cloudstone.aliyuncs.com" ),
56155686 "rus-west-1-pop" : tea .String ("tag.aliyuncs.com" ),
56165687 }
@@ -6043,7 +6114,7 @@ func (client *Client) CreatePolicy(request *CreatePolicyRequest) (_result *Creat
60436114
60446115// Summary:
60456116//
6046- // Creates preset tags.
6117+ // Creates predefined tags.
60476118//
60486119// Description:
60496120//
@@ -6120,7 +6191,7 @@ func (client *Client) CreateTagsWithOptions(request *CreateTagsRequest, runtime
61206191
61216192// Summary:
61226193//
6123- // Creates preset tags.
6194+ // Creates predefined tags.
61246195//
61256196// Description:
61266197//
@@ -6983,6 +7054,10 @@ func (client *Client) GetEffectivePolicyWithOptions(request *GetEffectivePolicyR
69837054 query ["ResourceOwnerAccount" ] = request .ResourceOwnerAccount
69847055 }
69857056
7057+ if ! tea .BoolValue (util .IsUnset (request .TagKeys )) {
7058+ query ["TagKeys" ] = request .TagKeys
7059+ }
7060+
69867061 if ! tea .BoolValue (util .IsUnset (request .TargetId )) {
69877062 query ["TargetId" ] = request .TargetId
69887063 }
@@ -7723,7 +7798,7 @@ func (client *Client) ListResourcesByTag(request *ListResourcesByTagRequest) (_r
77237798//
77247799// Description:
77257800//
7726- // ### [](#)Call examples
7801+ // ### [](#)Call example
77277802//
77287803// - Query a list of resource types supported by TagResources or UntagResources. For more information, see [Example](https://api.alibabacloud.com/api/Tag/2018-08-28/ListSupportResourceTypes?tab=DEBUG\\¶ms=%7B%22RegionId%22:%22cn-hangzhou%22,%22SupportCode%22:%22TAG_CONSOLE_SUPPORT%22%7D).
77297804//
@@ -7822,7 +7897,7 @@ func (client *Client) ListSupportResourceTypesWithOptions(request *ListSupportRe
78227897//
78237898// Description:
78247899//
7825- // ### [](#)Call examples
7900+ // ### [](#)Call example
78267901//
78277902// - Query a list of resource types supported by TagResources or UntagResources. For more information, see [Example](https://api.alibabacloud.com/api/Tag/2018-08-28/ListSupportResourceTypes?tab=DEBUG\\¶ms=%7B%22RegionId%22:%22cn-hangzhou%22,%22SupportCode%22:%22TAG_CONSOLE_SUPPORT%22%7D).
78287903//
0 commit comments