Skip to content

Commit d110dea

Browse files
This release adds a new authorization policy to control the usage of custom AssetType when creating an Asset. Customer can now add new grant(s) of policyType USE_ASSET_TYPE for custom AssetTypes to apply authorization policy to projects members and domain unit owners.
1 parent 7466371 commit d110dea

12 files changed

+298
-9
lines changed

generator/ServiceModels/datazone/datazone-2018-05-10.api.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11075,7 +11075,8 @@
1107511075
"DELEGATE_CREATE_ENVIRONMENT_PROFILE",
1107611076
"CREATE_ENVIRONMENT",
1107711077
"CREATE_ENVIRONMENT_FROM_BLUEPRINT",
11078-
"CREATE_PROJECT_FROM_PROJECT_PROFILE"
11078+
"CREATE_PROJECT_FROM_PROJECT_PROFILE",
11079+
"USE_ASSET_TYPE"
1107911080
]
1108011081
},
1108111082
"MatchCriteria":{
@@ -11540,7 +11541,8 @@
1154011541
"createProjectFromProjectProfile":{"shape":"CreateProjectFromProjectProfilePolicyGrantDetail"},
1154111542
"delegateCreateEnvironmentProfile":{"shape":"Unit"},
1154211543
"overrideDomainUnitOwners":{"shape":"OverrideDomainUnitOwnersPolicyGrantDetail"},
11543-
"overrideProjectOwners":{"shape":"OverrideProjectOwnersPolicyGrantDetail"}
11544+
"overrideProjectOwners":{"shape":"OverrideProjectOwnersPolicyGrantDetail"},
11545+
"useAssetType":{"shape":"UseAssetTypePolicyGrantDetail"}
1154411546
},
1154511547
"union":true
1154611548
},
@@ -13643,7 +13645,8 @@
1364313645
"enum":[
1364413646
"DOMAIN_UNIT",
1364513647
"ENVIRONMENT_BLUEPRINT_CONFIGURATION",
13646-
"ENVIRONMENT_PROFILE"
13648+
"ENVIRONMENT_PROFILE",
13649+
"ASSET_TYPE"
1364713650
]
1364813651
},
1364913652
"TaskId":{
@@ -14835,6 +14838,12 @@
1483514838
},
1483614839
"UpdatedAt":{"type":"timestamp"},
1483714840
"UpdatedBy":{"type":"string"},
14841+
"UseAssetTypePolicyGrantDetail":{
14842+
"type":"structure",
14843+
"members":{
14844+
"domainUnitId":{"shape":"DomainUnitId"}
14845+
}
14846+
},
1483814847
"UserAssignment":{
1483914848
"type":"string",
1484014849
"enum":[

generator/ServiceModels/datazone/datazone-2018-05-10.docs.json

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,7 @@
630630
"GetSubscriptionTargetOutput$authorizedPrincipals": "<p>The authorized principals of the subscription target.</p>",
631631
"SubscriptionTargetSummary$authorizedPrincipals": "<p>The authorized principals included in the subscription target.</p>",
632632
"UpdateSubscriptionTargetInput$authorizedPrincipals": "<p>The authorized principals to be updated as part of the <code>UpdateSubscriptionTarget</code> action.</p>",
633-
"UpdateSubscriptionTargetOutput$authorizedPrincipals": "<p>The authorized principals to be updated as part of the <code>UpdateSubscriptionTarget</code> action.</p>"
633+
"UpdateSubscriptionTargetOutput$authorizedPrincipals": "<p>The authorized principals to be updated as part of the <code>UpdateSubscriptionTarget</code> action. Updates are supported in batches of 5 at a time.</p>"
634634
}
635635
},
636636
"AwsAccount": {
@@ -2616,7 +2616,8 @@
26162616
"UpdateDomainUnitOutput$parentDomainUnitId": "<p>The ID of the parent domain unit.</p>",
26172617
"UpdateProjectOutput$domainUnitId": "<p>The ID of the domain unit.</p>",
26182618
"UpdateProjectProfileInput$domainUnitIdentifier": "<p>The ID of the domain unit where a project profile is to be updated.</p>",
2619-
"UpdateProjectProfileOutput$domainUnitId": "<p>The domain unit ID of the project profile to be updated.</p>"
2619+
"UpdateProjectProfileOutput$domainUnitId": "<p>The domain unit ID of the project profile to be updated.</p>",
2620+
"UseAssetTypePolicyGrantDetail$domainUnitId": "<p>The ID of the domain unit.</p>"
26202621
}
26212622
},
26222623
"DomainUnitIds": {
@@ -8092,6 +8093,12 @@
80928093
"UpdateSubscriptionTargetOutput$updatedBy": "<p>The Amazon DataZone user who updated the subscription target.</p>"
80938094
}
80948095
},
8096+
"UseAssetTypePolicyGrantDetail": {
8097+
"base": "<p>Specifies the domain unit(s) whose projects can use this asset type while creating asset or asset revisions.</p>",
8098+
"refs": {
8099+
"PolicyGrantDetail$useAssetType": "<p> Specifies the domain unit(s) whose projects can use this asset type while creating asset or asset revisions.</p>"
8100+
}
8101+
},
80958102
"UserAssignment": {
80968103
"base": null,
80978104
"refs": {

generator/ServiceModels/datazone/datazone-2018-05-10.normal.json

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16314,7 +16314,8 @@
1631416314
"DELEGATE_CREATE_ENVIRONMENT_PROFILE",
1631516315
"CREATE_ENVIRONMENT",
1631616316
"CREATE_ENVIRONMENT_FROM_BLUEPRINT",
16317-
"CREATE_PROJECT_FROM_PROJECT_PROFILE"
16317+
"CREATE_PROJECT_FROM_PROJECT_PROFILE",
16318+
"USE_ASSET_TYPE"
1631816319
]
1631916320
},
1632016321
"MatchCriteria":{
@@ -17076,6 +17077,10 @@
1707617077
"overrideProjectOwners":{
1707717078
"shape":"OverrideProjectOwnersPolicyGrantDetail",
1707817079
"documentation":"<p>Specifies whether to override project owners.</p>"
17080+
},
17081+
"useAssetType":{
17082+
"shape":"UseAssetTypePolicyGrantDetail",
17083+
"documentation":"<p> Specifies the domain unit(s) whose projects can use this asset type while creating asset or asset revisions.</p>"
1707917084
}
1708017085
},
1708117086
"documentation":"<p>The details of the policy grant.</p>",
@@ -20551,7 +20556,8 @@
2055120556
"enum":[
2055220557
"DOMAIN_UNIT",
2055320558
"ENVIRONMENT_BLUEPRINT_CONFIGURATION",
20554-
"ENVIRONMENT_PROFILE"
20559+
"ENVIRONMENT_PROFILE",
20560+
"ASSET_TYPE"
2055520561
]
2055620562
},
2055720563
"TaskId":{
@@ -22567,7 +22573,7 @@
2256722573
},
2256822574
"authorizedPrincipals":{
2256922575
"shape":"AuthorizedPrincipalIdentifiers",
22570-
"documentation":"<p>The authorized principals to be updated as part of the <code>UpdateSubscriptionTarget</code> action.</p>"
22576+
"documentation":"<p>The authorized principals to be updated as part of the <code>UpdateSubscriptionTarget</code> action. Updates are supported in batches of 5 at a time.</p>"
2257122577
},
2257222578
"createdAt":{
2257322579
"shape":"CreatedAt",
@@ -22677,6 +22683,16 @@
2267722683
},
2267822684
"UpdatedAt":{"type":"timestamp"},
2267922685
"UpdatedBy":{"type":"string"},
22686+
"UseAssetTypePolicyGrantDetail":{
22687+
"type":"structure",
22688+
"members":{
22689+
"domainUnitId":{
22690+
"shape":"DomainUnitId",
22691+
"documentation":"<p>The ID of the domain unit.</p>"
22692+
}
22693+
},
22694+
"documentation":"<p>Specifies the domain unit(s) whose projects can use this asset type while creating asset or asset revisions.</p>"
22695+
},
2268022696
"UserAssignment":{
2268122697
"type":"string",
2268222698
"enum":[

sdk/code-analysis/ServiceAnalysis/DataZone/Generated/PropertyValueRules.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6069,6 +6069,12 @@
60696069
<min>1</min>
60706070
<max>64</max>
60716071
</property-value-rule>
6072+
<property-value-rule>
6073+
<property>Amazon.DataZone.Model.UseAssetTypePolicyGrantDetail.DomainUnitId</property>
6074+
<min>1</min>
6075+
<max>256</max>
6076+
<pattern>^[a-z0-9_\-]+$</pattern>
6077+
</property-value-rule>
60726078
<property-value-rule>
60736079
<property>Amazon.DataZone.Model.UsernamePassword.Password</property>
60746080
<min>0</min>

sdk/src/Services/DataZone/Generated/Model/Internal/MarshallTransformations/PolicyGrantDetailMarshaller.cs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,17 @@ public void Marshall(PolicyGrantDetail requestObject, JsonMarshallerContext cont
189189
context.Writer.WriteEndObject();
190190
}
191191

192+
if(requestObject.IsSetUseAssetType())
193+
{
194+
context.Writer.WritePropertyName("useAssetType");
195+
context.Writer.WriteStartObject();
196+
197+
var marshaller = UseAssetTypePolicyGrantDetailMarshaller.Instance;
198+
marshaller.Marshall(requestObject.UseAssetType, context);
199+
200+
context.Writer.WriteEndObject();
201+
}
202+
192203
}
193204

194205
/// <summary>

sdk/src/Services/DataZone/Generated/Model/Internal/MarshallTransformations/PolicyGrantDetailUnmarshaller.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,12 @@ public PolicyGrantDetail Unmarshall(JsonUnmarshallerContext context, ref Streami
134134
unmarshalledObject.OverrideProjectOwners = unmarshaller.Unmarshall(context, ref reader);
135135
continue;
136136
}
137+
if (context.TestExpression("useAssetType", targetDepth))
138+
{
139+
var unmarshaller = UseAssetTypePolicyGrantDetailUnmarshaller.Instance;
140+
unmarshalledObject.UseAssetType = unmarshaller.Unmarshall(context, ref reader);
141+
continue;
142+
}
137143
}
138144
return unmarshalledObject;
139145
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the datazone-2018-05-10.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Globalization;
22+
using System.IO;
23+
using System.Text;
24+
using System.Xml.Serialization;
25+
26+
using Amazon.DataZone.Model;
27+
using Amazon.Runtime;
28+
using Amazon.Runtime.Internal;
29+
using Amazon.Runtime.Internal.Transform;
30+
using Amazon.Runtime.Internal.Util;
31+
#pragma warning disable CS0612,CS0618
32+
namespace Amazon.DataZone.Model.Internal.MarshallTransformations
33+
{
34+
/// <summary>
35+
/// UseAssetTypePolicyGrantDetail Marshaller
36+
/// </summary>
37+
public class UseAssetTypePolicyGrantDetailMarshaller : IRequestMarshaller<UseAssetTypePolicyGrantDetail, JsonMarshallerContext>
38+
{
39+
/// <summary>
40+
/// Unmarshaller the response from the service to the response class.
41+
/// </summary>
42+
/// <param name="requestObject"></param>
43+
/// <param name="context"></param>
44+
/// <returns></returns>
45+
public void Marshall(UseAssetTypePolicyGrantDetail requestObject, JsonMarshallerContext context)
46+
{
47+
if(requestObject == null)
48+
return;
49+
if(requestObject.IsSetDomainUnitId())
50+
{
51+
context.Writer.WritePropertyName("domainUnitId");
52+
context.Writer.WriteStringValue(requestObject.DomainUnitId);
53+
}
54+
55+
}
56+
57+
/// <summary>
58+
/// Singleton Marshaller.
59+
/// </summary>
60+
public readonly static UseAssetTypePolicyGrantDetailMarshaller Instance = new UseAssetTypePolicyGrantDetailMarshaller();
61+
62+
}
63+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
/*
2+
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License").
5+
* You may not use this file except in compliance with the License.
6+
* A copy of the License is located at
7+
*
8+
* http://aws.amazon.com/apache2.0
9+
*
10+
* or in the "license" file accompanying this file. This file is distributed
11+
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12+
* express or implied. See the License for the specific language governing
13+
* permissions and limitations under the License.
14+
*/
15+
16+
/*
17+
* Do not modify this file. This file is generated from the datazone-2018-05-10.normal.json service model.
18+
*/
19+
using System;
20+
using System.Collections.Generic;
21+
using System.Globalization;
22+
using System.IO;
23+
using System.Net;
24+
using System.Text;
25+
using System.Xml.Serialization;
26+
27+
using Amazon.DataZone.Model;
28+
using Amazon.Runtime;
29+
using Amazon.Runtime.Internal;
30+
using Amazon.Runtime.Internal.Transform;
31+
using Amazon.Runtime.Internal.Util;
32+
using System.Text.Json;
33+
#pragma warning disable CS0612,CS0618
34+
namespace Amazon.DataZone.Model.Internal.MarshallTransformations
35+
{
36+
/// <summary>
37+
/// Response Unmarshaller for UseAssetTypePolicyGrantDetail Object
38+
/// </summary>
39+
public class UseAssetTypePolicyGrantDetailUnmarshaller : IJsonUnmarshaller<UseAssetTypePolicyGrantDetail, JsonUnmarshallerContext>
40+
{
41+
/// <summary>
42+
/// Unmarshaller the response from the service to the response class.
43+
/// </summary>
44+
/// <param name="context"></param>
45+
/// <param name="reader"></param>
46+
/// <returns>The unmarshalled object</returns>
47+
public UseAssetTypePolicyGrantDetail Unmarshall(JsonUnmarshallerContext context, ref StreamingUtf8JsonReader reader)
48+
{
49+
UseAssetTypePolicyGrantDetail unmarshalledObject = new UseAssetTypePolicyGrantDetail();
50+
if (context.IsEmptyResponse)
51+
return null;
52+
context.Read(ref reader);
53+
if (context.CurrentTokenType == JsonTokenType.Null)
54+
return null;
55+
56+
int targetDepth = context.CurrentDepth;
57+
while (context.ReadAtDepth(targetDepth, ref reader))
58+
{
59+
if (context.TestExpression("domainUnitId", targetDepth))
60+
{
61+
var unmarshaller = StringUnmarshaller.Instance;
62+
unmarshalledObject.DomainUnitId = unmarshaller.Unmarshall(context, ref reader);
63+
continue;
64+
}
65+
}
66+
return unmarshalledObject;
67+
}
68+
69+
70+
private static UseAssetTypePolicyGrantDetailUnmarshaller _instance = new UseAssetTypePolicyGrantDetailUnmarshaller();
71+
72+
/// <summary>
73+
/// Gets the singleton.
74+
/// </summary>
75+
public static UseAssetTypePolicyGrantDetailUnmarshaller Instance
76+
{
77+
get
78+
{
79+
return _instance;
80+
}
81+
}
82+
}
83+
}

sdk/src/Services/DataZone/Generated/Model/PolicyGrantDetail.cs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public partial class PolicyGrantDetail
4747
private Unit _delegateCreateEnvironmentProfile;
4848
private OverrideDomainUnitOwnersPolicyGrantDetail _overrideDomainUnitOwners;
4949
private OverrideProjectOwnersPolicyGrantDetail _overrideProjectOwners;
50+
private UseAssetTypePolicyGrantDetail _useAssetType;
5051

5152
/// <summary>
5253
/// Gets and sets the property AddToProjectMemberPool.
@@ -279,5 +280,24 @@ internal bool IsSetOverrideProjectOwners()
279280
return this._overrideProjectOwners != null;
280281
}
281282

283+
/// <summary>
284+
/// Gets and sets the property UseAssetType.
285+
/// <para>
286+
/// Specifies the domain unit(s) whose projects can use this asset type while creating
287+
/// asset or asset revisions.
288+
/// </para>
289+
/// </summary>
290+
public UseAssetTypePolicyGrantDetail UseAssetType
291+
{
292+
get { return this._useAssetType; }
293+
set { this._useAssetType = value; }
294+
}
295+
296+
// Check to see if UseAssetType property is set
297+
internal bool IsSetUseAssetType()
298+
{
299+
return this._useAssetType != null;
300+
}
301+
282302
}
283303
}

sdk/src/Services/DataZone/Generated/Model/UpdateSubscriptionTargetResponse.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ internal bool IsSetApplicableAssetTypes()
7474
/// Gets and sets the property AuthorizedPrincipals.
7575
/// <para>
7676
/// The authorized principals to be updated as part of the <c>UpdateSubscriptionTarget</c>
77-
/// action.
77+
/// action. Updates are supported in batches of 5 at a time.
7878
/// </para>
7979
/// </summary>
8080
[AWSProperty(Required=true, Min=1, Max=20)]

0 commit comments

Comments
 (0)