Skip to content

Commit 32e807c

Browse files
Providing Tagging support for DomainName in AppSync
1 parent de1b85a commit 32e807c

File tree

7 files changed

+94
-3
lines changed

7 files changed

+94
-3
lines changed

generator/ServiceModels/appsync/appsync-2017-07-25.api.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1757,7 +1757,8 @@
17571757
"members":{
17581758
"domainName":{"shape":"DomainName"},
17591759
"certificateArn":{"shape":"CertificateArn"},
1760-
"description":{"shape":"Description"}
1760+
"description":{"shape":"Description"},
1761+
"tags":{"shape":"TagMap"}
17611762
}
17621763
},
17631764
"CreateDomainNameResponse":{
@@ -2324,7 +2325,9 @@
23242325
"description":{"shape":"Description"},
23252326
"certificateArn":{"shape":"CertificateArn"},
23262327
"appsyncDomainName":{"shape":"String"},
2327-
"hostedZoneId":{"shape":"String"}
2328+
"hostedZoneId":{"shape":"String"},
2329+
"tags":{"shape":"TagMap"},
2330+
"domainNameArn":{"shape":"String"}
23282331
}
23292332
},
23302333
"DomainNameConfigs":{

generator/ServiceModels/appsync/appsync-2017-07-25.docs.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,6 +1917,7 @@
19171917
"DisassociateSourceGraphqlApiRequest$associationId": "<p>The ID generated by the AppSync service for the source API association.</p>",
19181918
"DomainNameConfig$appsyncDomainName": "<p>The domain name that AppSync provides.</p>",
19191919
"DomainNameConfig$hostedZoneId": "<p>The ID of your Amazon Route 53 hosted zone.</p>",
1920+
"DomainNameConfig$domainNameArn": "<p>The Amazon Resource Name (ARN) of the domain name.</p>",
19201921
"DynamodbDataSourceConfig$tableName": "<p>The table name.</p>",
19211922
"DynamodbDataSourceConfig$awsRegion": "<p>The Amazon Web Services Region.</p>",
19221923
"ElasticsearchDataSourceConfig$endpoint": "<p>The endpoint.</p>",
@@ -2078,7 +2079,9 @@
20782079
"ChannelNamespace$tags": null,
20792080
"CreateApiRequest$tags": null,
20802081
"CreateChannelNamespaceRequest$tags": null,
2082+
"CreateDomainNameRequest$tags": null,
20812083
"CreateGraphqlApiRequest$tags": "<p>A <code>TagMap</code> object.</p>",
2084+
"DomainNameConfig$tags": null,
20822085
"GraphqlApi$tags": "<p>The tags.</p>",
20832086
"ListTagsForResourceResponse$tags": "<p>A <code>TagMap</code> object.</p>",
20842087
"TagResourceRequest$tags": "<p>A <code>TagMap</code> object.</p>"

generator/ServiceModels/appsync/appsync-2017-07-25.normal.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2180,7 +2180,8 @@
21802180
"description":{
21812181
"shape":"Description",
21822182
"documentation":"<p>A description of the <code>DomainName</code>.</p>"
2183-
}
2183+
},
2184+
"tags":{"shape":"TagMap"}
21842185
}
21852186
},
21862187
"CreateDomainNameResponse":{
@@ -3028,6 +3029,11 @@
30283029
"hostedZoneId":{
30293030
"shape":"String",
30303031
"documentation":"<p>The ID of your Amazon Route 53 hosted zone.</p>"
3032+
},
3033+
"tags":{"shape":"TagMap"},
3034+
"domainNameArn":{
3035+
"shape":"String",
3036+
"documentation":"<p>The Amazon Resource Name (ARN) of the domain name.</p>"
30313037
}
30323038
},
30333039
"documentation":"<p>Describes a configuration for a custom domain.</p>"

sdk/src/Services/AppSync/Generated/Model/CreateDomainNameRequest.cs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ public partial class CreateDomainNameRequest : AmazonAppSyncRequest
3838
private string _certificateArn;
3939
private string _description;
4040
private string _domainName;
41+
private Dictionary<string, string> _tags = AWSConfigs.InitializeCollections ? new Dictionary<string, string>() : null;
4142

4243
/// <summary>
4344
/// Gets and sets the property CertificateArn.
@@ -97,5 +98,21 @@ internal bool IsSetDomainName()
9798
return this._domainName != null;
9899
}
99100

101+
/// <summary>
102+
/// Gets and sets the property Tags.
103+
/// </summary>
104+
[AWSProperty(Min=1, Max=50)]
105+
public Dictionary<string, string> Tags
106+
{
107+
get { return this._tags; }
108+
set { this._tags = value; }
109+
}
110+
111+
// Check to see if Tags property is set
112+
internal bool IsSetTags()
113+
{
114+
return this._tags != null && (this._tags.Count > 0 || !AWSConfigs.InitializeCollections);
115+
}
116+
100117
}
101118
}

sdk/src/Services/AppSync/Generated/Model/DomainNameConfig.cs

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ public partial class DomainNameConfig
3838
private string _certificateArn;
3939
private string _description;
4040
private string _domainName;
41+
private string _domainNameArn;
4142
private string _hostedZoneId;
43+
private Dictionary<string, string> _tags = AWSConfigs.InitializeCollections ? new Dictionary<string, string>() : null;
4244

4345
/// <summary>
4446
/// Gets and sets the property AppsyncDomainName.
@@ -116,6 +118,24 @@ internal bool IsSetDomainName()
116118
return this._domainName != null;
117119
}
118120

121+
/// <summary>
122+
/// Gets and sets the property DomainNameArn.
123+
/// <para>
124+
/// The Amazon Resource Name (ARN) of the domain name.
125+
/// </para>
126+
/// </summary>
127+
public string DomainNameArn
128+
{
129+
get { return this._domainNameArn; }
130+
set { this._domainNameArn = value; }
131+
}
132+
133+
// Check to see if DomainNameArn property is set
134+
internal bool IsSetDomainNameArn()
135+
{
136+
return this._domainNameArn != null;
137+
}
138+
119139
/// <summary>
120140
/// Gets and sets the property HostedZoneId.
121141
/// <para>
@@ -134,5 +154,21 @@ internal bool IsSetHostedZoneId()
134154
return this._hostedZoneId != null;
135155
}
136156

157+
/// <summary>
158+
/// Gets and sets the property Tags.
159+
/// </summary>
160+
[AWSProperty(Min=1, Max=50)]
161+
public Dictionary<string, string> Tags
162+
{
163+
get { return this._tags; }
164+
set { this._tags = value; }
165+
}
166+
167+
// Check to see if Tags property is set
168+
internal bool IsSetTags()
169+
{
170+
return this._tags != null && (this._tags.Count > 0 || !AWSConfigs.InitializeCollections);
171+
}
172+
137173
}
138174
}

sdk/src/Services/AppSync/Generated/Model/Internal/MarshallTransformations/CreateDomainNameRequestMarshaller.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,20 @@ public IRequest Marshall(CreateDomainNameRequest publicRequest)
8585
context.Writer.Write(publicRequest.DomainName);
8686
}
8787

88+
if(publicRequest.IsSetTags())
89+
{
90+
context.Writer.WritePropertyName("tags");
91+
context.Writer.WriteObjectStart();
92+
foreach (var publicRequestTagsKvp in publicRequest.Tags)
93+
{
94+
context.Writer.WritePropertyName(publicRequestTagsKvp.Key);
95+
var publicRequestTagsValue = publicRequestTagsKvp.Value;
96+
97+
context.Writer.Write(publicRequestTagsValue);
98+
}
99+
context.Writer.WriteObjectEnd();
100+
}
101+
88102
writer.WriteObjectEnd();
89103
string snippet = stringWriter.ToString();
90104
request.Content = System.Text.Encoding.UTF8.GetBytes(snippet);

sdk/src/Services/AppSync/Generated/Model/Internal/MarshallTransformations/DomainNameConfigUnmarshaller.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,12 +90,24 @@ public DomainNameConfig Unmarshall(JsonUnmarshallerContext context)
9090
unmarshalledObject.DomainName = unmarshaller.Unmarshall(context);
9191
continue;
9292
}
93+
if (context.TestExpression("domainNameArn", targetDepth))
94+
{
95+
var unmarshaller = StringUnmarshaller.Instance;
96+
unmarshalledObject.DomainNameArn = unmarshaller.Unmarshall(context);
97+
continue;
98+
}
9399
if (context.TestExpression("hostedZoneId", targetDepth))
94100
{
95101
var unmarshaller = StringUnmarshaller.Instance;
96102
unmarshalledObject.HostedZoneId = unmarshaller.Unmarshall(context);
97103
continue;
98104
}
105+
if (context.TestExpression("tags", targetDepth))
106+
{
107+
var unmarshaller = new DictionaryUnmarshaller<string, string, StringUnmarshaller, StringUnmarshaller>(StringUnmarshaller.Instance, StringUnmarshaller.Instance);
108+
unmarshalledObject.Tags = unmarshaller.Unmarshall(context);
109+
continue;
110+
}
99111
}
100112
return unmarshalledObject;
101113
}

0 commit comments

Comments
 (0)