Skip to content

Commit ea7e8fe

Browse files
This release introduces 2 new APIs in Organizations: 1. ListAccountsWithInvalidEffectivePolicy 2. ListEffectivePolicyValidationErrors
1 parent 5d67b8a commit ea7e8fe

28 files changed

+8603
-937
lines changed

docgenerator/AWSSDKDocSamples/Organizations.GeneratedSamples.extra.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,25 @@
511511
</example>
512512
</value>
513513
</doc>
514+
<doc>
515+
<members>
516+
<member name="M:Amazon.Organizations.IAmazonOrganizations.ListAccountsWithInvalidEffectivePolicy(Amazon.Organizations.Model.ListAccountsWithInvalidEffectivePolicyRequest)" />
517+
<member name="M:Amazon.Organizations.AmazonOrganizationsClient.ListAccountsWithInvalidEffectivePolicy(Amazon.Organizations.Model.ListAccountsWithInvalidEffectivePolicyRequest)" />
518+
<member name="T:Amazon.Organizations.Model.ListAccountsWithInvalidEffectivePolicyRequest" />
519+
<member name="T:Amazon.Organizations.Model.ListAccountsWithInvalidEffectivePolicyResponse" />
520+
</members>
521+
<value>
522+
<example>
523+
<para>
524+
The following example shows you how to request a list of the accounts in an organization having invalid effective policy for a policy type:
525+
</para>
526+
<code
527+
title="To list all accounts in an organization with invalid effective policy"
528+
source=".\AWSSDKDocSamples\Organizations\Organizations.GeneratedSamples.cs"
529+
region="to-list-all-accounts-in-an-organization-with-invalid-effective-policy" />
530+
</example>
531+
</value>
532+
</doc>
514533
<doc>
515534
<members>
516535
<member name="M:Amazon.Organizations.IAmazonOrganizations.ListChildren(Amazon.Organizations.Model.ListChildrenRequest)" />
@@ -568,6 +587,25 @@
568587
</example>
569588
</value>
570589
</doc>
590+
<doc>
591+
<members>
592+
<member name="M:Amazon.Organizations.IAmazonOrganizations.ListEffectivePolicyValidationErrors(Amazon.Organizations.Model.ListEffectivePolicyValidationErrorsRequest)" />
593+
<member name="M:Amazon.Organizations.AmazonOrganizationsClient.ListEffectivePolicyValidationErrors(Amazon.Organizations.Model.ListEffectivePolicyValidationErrorsRequest)" />
594+
<member name="T:Amazon.Organizations.Model.ListEffectivePolicyValidationErrorsRequest" />
595+
<member name="T:Amazon.Organizations.Model.ListEffectivePolicyValidationErrorsResponse" />
596+
</members>
597+
<value>
598+
<example>
599+
<para>
600+
The following example shows you how to request a list of effective policy validation errors for an account and policy type:
601+
</para>
602+
<code
603+
title="To list all effective policy validation errors for an account policy type"
604+
source=".\AWSSDKDocSamples\Organizations\Organizations.GeneratedSamples.cs"
605+
region="to-list-all-effective-policy-validation-errors-for-an-account-policy-type" />
606+
</example>
607+
</value>
608+
</doc>
571609
<doc>
572610
<members>
573611
<member name="M:Amazon.Organizations.IAmazonOrganizations.ListHandshakesForAccount(Amazon.Organizations.Model.ListHandshakesForAccountRequest)" />

docgenerator/AWSSDKDocSamples/Organizations/Organizations.GeneratedSamples.cs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,21 @@ public void OrganizationsListAccountsForParent()
404404
#endregion
405405
}
406406

407+
public void OrganizationsListAccountsWithInvalidEffectivePolicy()
408+
{
409+
#region to-list-all-accounts-in-an-organization-with-invalid-effective-policy
410+
411+
var client = new AmazonOrganizationsClient();
412+
var response = client.ListAccountsWithInvalidEffectivePolicy(new ListAccountsWithInvalidEffectivePolicyRequest
413+
{
414+
PolicyType = "BACKUP_POLICY"
415+
});
416+
417+
List<Account> accounts = response.Accounts;
418+
419+
#endregion
420+
}
421+
407422
public void OrganizationsListChildren()
408423
{
409424
#region to-retrieve-a-list-of-all-of-the-child-accounts-and-OUs-in-a-parent-container
@@ -454,6 +469,26 @@ public void OrganizationsListCreateAccountStatus()
454469
#endregion
455470
}
456471

472+
public void OrganizationsListEffectivePolicyValidationErrors()
473+
{
474+
#region to-list-all-effective-policy-validation-errors-for-an-account-policy-type
475+
476+
var client = new AmazonOrganizationsClient();
477+
var response = client.ListEffectivePolicyValidationErrors(new ListEffectivePolicyValidationErrorsRequest
478+
{
479+
AccountId = "111111111111",
480+
PolicyType = "BACKUP_POLICY"
481+
});
482+
483+
string accountId = response.AccountId;
484+
List<EffectivePolicyValidationError> effectivePolicyValidationErrors = response.EffectivePolicyValidationErrors;
485+
DateTime evaluationTimestamp = response.EvaluationTimestamp;
486+
string path = response.Path;
487+
string policyType = response.PolicyType;
488+
489+
#endregion
490+
}
491+
457492
public void OrganizationsListHandshakesForAccount()
458493
{
459494
#region to-retrieve-a-list-of-the-handshakes-sent-to-an-account-1472510214747

generator/ServiceModels/organizations/organizations-2016-11-28.api.json

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -662,6 +662,25 @@
662662
{"shape":"TooManyRequestsException"}
663663
]
664664
},
665+
"ListAccountsWithInvalidEffectivePolicy":{
666+
"name":"ListAccountsWithInvalidEffectivePolicy",
667+
"http":{
668+
"method":"POST",
669+
"requestUri":"/"
670+
},
671+
"input":{"shape":"ListAccountsWithInvalidEffectivePolicyRequest"},
672+
"output":{"shape":"ListAccountsWithInvalidEffectivePolicyResponse"},
673+
"errors":[
674+
{"shape":"AccessDeniedException"},
675+
{"shape":"AWSOrganizationsNotInUseException"},
676+
{"shape":"ConstraintViolationException"},
677+
{"shape":"EffectivePolicyNotFoundException"},
678+
{"shape":"ServiceException"},
679+
{"shape":"TooManyRequestsException"},
680+
{"shape":"InvalidInputException"},
681+
{"shape":"UnsupportedAPIEndpointException"}
682+
]
683+
},
665684
"ListChildren":{
666685
"name":"ListChildren",
667686
"http":{
@@ -734,6 +753,26 @@
734753
{"shape":"UnsupportedAPIEndpointException"}
735754
]
736755
},
756+
"ListEffectivePolicyValidationErrors":{
757+
"name":"ListEffectivePolicyValidationErrors",
758+
"http":{
759+
"method":"POST",
760+
"requestUri":"/"
761+
},
762+
"input":{"shape":"ListEffectivePolicyValidationErrorsRequest"},
763+
"output":{"shape":"ListEffectivePolicyValidationErrorsResponse"},
764+
"errors":[
765+
{"shape":"AccessDeniedException"},
766+
{"shape":"AWSOrganizationsNotInUseException"},
767+
{"shape":"ConstraintViolationException"},
768+
{"shape":"EffectivePolicyNotFoundException"},
769+
{"shape":"ServiceException"},
770+
{"shape":"TooManyRequestsException"},
771+
{"shape":"AccountNotFoundException"},
772+
{"shape":"InvalidInputException"},
773+
{"shape":"UnsupportedAPIEndpointException"}
774+
]
775+
},
737776
"ListHandshakesForAccount":{
738777
"name":"ListHandshakesForAccount",
739778
"http":{
@@ -1729,6 +1768,19 @@
17291768
"SECURITYHUB_POLICY"
17301769
]
17311770
},
1771+
"EffectivePolicyValidationError":{
1772+
"type":"structure",
1773+
"members":{
1774+
"ErrorCode":{"shape":"ErrorCode"},
1775+
"ErrorMessage":{"shape":"ErrorMessage"},
1776+
"PathToError":{"shape":"PathToError"},
1777+
"ContributingPolicies":{"shape":"PolicyIds"}
1778+
}
1779+
},
1780+
"EffectivePolicyValidationErrors":{
1781+
"type":"list",
1782+
"member":{"shape":"EffectivePolicyValidationError"}
1783+
},
17321784
"Email":{
17331785
"type":"string",
17341786
"max":64,
@@ -1781,6 +1833,8 @@
17811833
"type":"list",
17821834
"member":{"shape":"EnabledServicePrincipal"}
17831835
},
1836+
"ErrorCode":{"type":"string"},
1837+
"ErrorMessage":{"type":"string"},
17841838
"ExceptionMessage":{"type":"string"},
17851839
"ExceptionType":{"type":"string"},
17861840
"FinalizingOrganizationException":{
@@ -2056,6 +2110,23 @@
20562110
"NextToken":{"shape":"NextToken"}
20572111
}
20582112
},
2113+
"ListAccountsWithInvalidEffectivePolicyRequest":{
2114+
"type":"structure",
2115+
"required":["PolicyType"],
2116+
"members":{
2117+
"PolicyType":{"shape":"EffectivePolicyType"},
2118+
"NextToken":{"shape":"NextToken"},
2119+
"MaxResults":{"shape":"MaxResults"}
2120+
}
2121+
},
2122+
"ListAccountsWithInvalidEffectivePolicyResponse":{
2123+
"type":"structure",
2124+
"members":{
2125+
"Accounts":{"shape":"Accounts"},
2126+
"PolicyType":{"shape":"EffectivePolicyType"},
2127+
"NextToken":{"shape":"NextToken"}
2128+
}
2129+
},
20592130
"ListChildrenRequest":{
20602131
"type":"structure",
20612132
"required":[
@@ -2122,6 +2193,30 @@
21222193
"NextToken":{"shape":"NextToken"}
21232194
}
21242195
},
2196+
"ListEffectivePolicyValidationErrorsRequest":{
2197+
"type":"structure",
2198+
"required":[
2199+
"AccountId",
2200+
"PolicyType"
2201+
],
2202+
"members":{
2203+
"AccountId":{"shape":"AccountId"},
2204+
"PolicyType":{"shape":"EffectivePolicyType"},
2205+
"NextToken":{"shape":"NextToken"},
2206+
"MaxResults":{"shape":"MaxResults"}
2207+
}
2208+
},
2209+
"ListEffectivePolicyValidationErrorsResponse":{
2210+
"type":"structure",
2211+
"members":{
2212+
"AccountId":{"shape":"AccountId"},
2213+
"PolicyType":{"shape":"EffectivePolicyType"},
2214+
"Path":{"shape":"Path"},
2215+
"EvaluationTimestamp":{"shape":"Timestamp"},
2216+
"NextToken":{"shape":"NextToken"},
2217+
"EffectivePolicyValidationErrors":{"shape":"EffectivePolicyValidationErrors"}
2218+
}
2219+
},
21252220
"ListHandshakesForAccountRequest":{
21262221
"type":"structure",
21272222
"members":{
@@ -2408,6 +2503,11 @@
24082503
"type":"list",
24092504
"member":{"shape":"Parent"}
24102505
},
2506+
"Path":{
2507+
"type":"string",
2508+
"pattern":"^(o-[a-z0-9]{10,32}\\/r-[0-9a-z]{4,32}(\\/ou\\-[0-9a-z]{4,32}-[a-z0-9]{8,32})*(\\/\\d{12})*)\\/"
2509+
},
2510+
"PathToError":{"type":"string"},
24112511
"Policies":{
24122512
"type":"list",
24132513
"member":{"shape":"PolicySummary"}
@@ -2445,6 +2545,10 @@
24452545
"max":130,
24462546
"pattern":"^p-[0-9a-zA-Z_]{8,128}$"
24472547
},
2548+
"PolicyIds":{
2549+
"type":"list",
2550+
"member":{"shape":"PolicyId"}
2551+
},
24482552
"PolicyInUseException":{
24492553
"type":"structure",
24502554
"members":{

0 commit comments

Comments
 (0)