Skip to content
This repository was archived by the owner on Aug 27, 2025. It is now read-only.

Commit b56f2be

Browse files
authored
Removing DomainOwner from Domain and AdministratorAccount from (#47)
* Removing DomainOwner from Domain and AdministratorAccount from Repository. * Adding DomainName,DomainOwner back into readOnly.
1 parent 9450f2b commit b56f2be

File tree

14 files changed

+2
-54
lines changed

14 files changed

+2
-54
lines changed

aws-codeartifact-domain/aws-codeartifact-domain.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,6 @@
1010
"minLength": 2,
1111
"maxLength": 50
1212
},
13-
"DomainOwner": {
14-
"description": "The 12-digit account ID of the AWS account that owns the domain.",
15-
"pattern": "[0-9]{12}",
16-
"type": "string"
17-
},
1813
"Name": {
1914
"description": "The name of the domain. This field is used for GetAtt",
2015
"type": "string",

aws-codeartifact-domain/inputs/inputs_1_create.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
"ExternalConnections": [
1515
"public:npmjs"
1616
],
17-
"DomainOwner": null,
1817
"DomainName": "create-contract-domain",
1918
"Description": "test description"
2019
}

aws-codeartifact-domain/inputs/inputs_1_update.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
},
1313
"Upstreams": null,
1414
"ExternalConnections": null,
15-
"DomainOwner": null,
1615
"DomainName": "create-contract-domain",
1716
"Description": "test description"
1817
}

aws-codeartifact-domain/src/main/java/software/amazon/codeartifact/domain/CreateHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ private CreateDomainResponse createDomainSdkCall(
6868
}
6969

7070
private boolean hasReadOnlyProperties(final ResourceModel model) {
71-
return model.getDomainOwner() != null || model.getName() != null || model.getOwner() != null;
71+
return model.getName() != null || model.getOwner() != null;
7272
}
7373

7474
private boolean isStabilized(

aws-codeartifact-domain/src/main/java/software/amazon/codeartifact/domain/Translator.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static CreateDomainRequest translateToCreateRequest(final ResourceModel model) {
6262
*/
6363
static DescribeDomainRequest translateToReadRequest(final ResourceModel model) {
6464
String domainName = model.getDomainName();
65-
String domainOwner = model.getDomainOwner();
65+
String domainOwner = model.getOwner();
6666

6767
if (model.getArn() != null && domainName == null && domainOwner == null) {
6868
// This is the case GetAtt or Ref is called on the resource
@@ -88,7 +88,6 @@ static ResourceModel translateFromReadResponse(final DescribeDomainResponse awsR
8888
.encryptionKey(domain.encryptionKey())
8989
.name(domain.name())
9090
.domainName(domain.name())
91-
.domainOwner(domain.owner())
9291
.owner(domain.owner())
9392
.arn(domain.arn())
9493
.build();
@@ -102,7 +101,6 @@ static ResourceModel translateFromReadResponse(final DescribeDomainResponse awsR
102101
static DeleteDomainRequest translateToDeleteRequest(final ResourceModel model) {
103102
return DeleteDomainRequest.builder()
104103
.domain(model.getDomainName())
105-
.domainOwner(model.getDomainOwner())
106104
.build();
107105
}
108106

@@ -115,7 +113,6 @@ static PutDomainPermissionsPolicyRequest translatePutDomainPolicyRequest(final R
115113
try {
116114
return PutDomainPermissionsPolicyRequest.builder()
117115
.policyDocument(MAPPER.writeValueAsString(model.getPermissionsPolicyDocument()))
118-
.domainOwner(model.getDomainOwner())
119116
.domain(model.getDomainName())
120117
.build();
121118
} catch (final JsonProcessingException e) {
@@ -130,7 +127,6 @@ static PutDomainPermissionsPolicyRequest translatePutDomainPolicyRequest(final R
130127
*/
131128
static DeleteDomainPermissionsPolicyRequest translateDeleteDomainPolicyRequest(final ResourceModel model) {
132129
return DeleteDomainPermissionsPolicyRequest.builder()
133-
.domainOwner(model.getDomainOwner())
134130
.domain(model.getDomainName())
135131
.build();
136132
}

aws-codeartifact-domain/src/test/java/software/amazon/codeartifact/domain/CreateHandlerTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ public class CreateHandlerTest extends AbstractTestBase {
7171

7272
private final ResourceModel desiredOutputModel = ResourceModel.builder()
7373
.domainName(DOMAIN_NAME)
74-
.domainOwner(DOMAIN_OWNER)
7574
.name(DOMAIN_NAME)
7675
.owner(DOMAIN_OWNER)
7776
.arn(DOMAIN_ARN)

aws-codeartifact-domain/src/test/java/software/amazon/codeartifact/domain/DeleteHandlerTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public void handleRequest_simpleSuccess() {
7878

7979
final ResourceModel model = ResourceModel.builder()
8080
.domainName(DOMAIN_NAME)
81-
.domainOwner(DOMAIN_OWNER)
8281
.build();
8382

8483
DeleteDomainResponse deleteDomainResponse = DeleteDomainResponse.builder()

aws-codeartifact-domain/src/test/java/software/amazon/codeartifact/domain/ReadHandlerTest.java

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public class ReadHandlerTest extends AbstractTestBase {
5050

5151
private final ResourceModel model = ResourceModel.builder()
5252
.domainName(DOMAIN_NAME)
53-
.domainOwner(DOMAIN_OWNER)
5453
.build();
5554

5655
@BeforeEach
@@ -96,7 +95,6 @@ public void handleRequest_simpleSuccess() {
9695

9796
final ResourceModel desiredOutputModel = ResourceModel.builder()
9897
.domainName(DOMAIN_NAME)
99-
.domainOwner(DOMAIN_OWNER)
10098
.owner(DOMAIN_OWNER)
10199
.name(DOMAIN_NAME)
102100
.arn(DOMAIN_ARN)
@@ -149,7 +147,6 @@ public void handleRequest_withOnlyArn() {
149147

150148
final ResourceModel desiredOutputModel = ResourceModel.builder()
151149
.domainName(DOMAIN_NAME)
152-
.domainOwner(DOMAIN_OWNER)
153150
.name(DOMAIN_NAME)
154151
.owner(DOMAIN_OWNER)
155152
.arn(DOMAIN_ARN)

aws-codeartifact-domain/src/test/java/software/amazon/codeartifact/domain/UpdateHandlerTest.java

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ public class UpdateHandlerTest extends AbstractTestBase {
6060

6161
private final ResourceModel desiredOutputModel = ResourceModel.builder()
6262
.domainName(DOMAIN_NAME)
63-
.domainOwner(DOMAIN_OWNER)
6463
.owner(DOMAIN_OWNER)
6564
.name(DOMAIN_NAME)
6665
.arn(DOMAIN_ARN)
@@ -85,13 +84,11 @@ public void handleRequest_simpleSuccess() throws JsonProcessingException {
8584

8685
final ResourceModel model = ResourceModel.builder()
8786
.domainName(DOMAIN_NAME)
88-
.domainOwner(DOMAIN_OWNER)
8987
.permissionsPolicyDocument(TEST_POLICY_DOC)
9088
.build();
9189

9290
final ResourceModel previousModel = ResourceModel.builder()
9391
.domainName(DOMAIN_NAME)
94-
.domainOwner(DOMAIN_OWNER)
9592
.build();
9693

9794
PutDomainPermissionsPolicyResponse putDomainPermissionsPolicyResponse = PutDomainPermissionsPolicyResponse.builder()
@@ -138,12 +135,10 @@ public void handleRequest_deleteDomainPermissionPolicy() throws JsonProcessingEx
138135

139136
final ResourceModel model = ResourceModel.builder()
140137
.domainName(DOMAIN_NAME)
141-
.domainOwner(DOMAIN_OWNER)
142138
.build();
143139

144140
final ResourceModel previousModel = ResourceModel.builder()
145141
.domainName(DOMAIN_NAME)
146-
.domainOwner(DOMAIN_OWNER)
147142
.permissionsPolicyDocument(TEST_POLICY_DOC)
148143
.build();
149144

@@ -194,7 +189,6 @@ public void handleRequest_throwsCfnNotUpdatableException() {
194189

195190
final ResourceModel previousModel = ResourceModel.builder()
196191
.domainName("different-domain-name")
197-
.domainOwner(DOMAIN_OWNER)
198192
.permissionsPolicyDocument(TEST_POLICY_DOC)
199193
.build();
200194

aws-codeartifact-repository/aws-codeartifact-repository.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,6 @@
2929
"pattern": "[0-9]{12}",
3030
"type": "string"
3131
},
32-
"AdministratorAccount": {
33-
"description": "The 12-digit account ID of the AWS account that manages the repository.",
34-
"pattern": "[0-9]{12}",
35-
"type": "string"
36-
},
3732
"Description": {
3833
"description": "A text description of the repository.",
3934
"type": "string",

0 commit comments

Comments
 (0)