

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

# Beispiele für Organizations, die AWS CLI
<a name="cli_organizations_code_examples"></a>

Die folgenden Codebeispiele zeigen Ihnen, wie Sie mithilfe von AWS Command Line Interface with Organizations Aktionen ausführen und allgemeine Szenarien implementieren.

*Aktionen* sind Codeauszüge aus größeren Programmen und müssen im Kontext ausgeführt werden. Während Aktionen Ihnen zeigen, wie Sie einzelne Service-Funktionen aufrufen, können Sie Aktionen im Kontext der zugehörigen Szenarien anzeigen.

Jedes Beispiel enthält einen Link zum vollständigen Quellcode, wo Sie Anweisungen zum Einrichten und Ausführen des Codes im Kodex finden.

**Topics**
+ [Aktionen](#actions)

## Aktionen
<a name="actions"></a>

### `accept-handshake`
<a name="organizations_AcceptHandshake_cli_topic"></a>

Das folgende Codebeispiel zeigt, wie Sie`accept-handshake`.

**AWS CLI**  
**So akzeptieren Sie einen Handshake von einem anderen Konto**  
Bill, der Inhaber einer Organisation, hat Juans Konto zuvor eingeladen, seiner Organisation beizutreten. Das folgende Beispiel zeigt, wie Juans Konto den Handshake akzeptiert und damit der Einladung zustimmt.  

```
aws organizations accept-handshake --handshake-id {{h-examplehandshakeid111}}
```
Die Ausgabe zeigt Folgendes:  

```
{
        "Handshake": {
                "Action": "INVITE",
                "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
                "RequestedTimestamp": 1481656459.257,
                "ExpirationTimestamp": 1482952459.257,
                "Id": "h-examplehandshakeid111",
                "Parties": [
                        {
                                "Id": "o-exampleorgid",
                                "Type": "ORGANIZATION"
                        },
                        {
                                "Id": "juan@example.com",
                                "Type": "EMAIL"
                        }
                ],
                "Resources": [
                        {
                                "Resources": [
                                        {
                                                "Type": "MASTER_EMAIL",
                                                "Value": "bill@amazon.com"
                                        },
                                        {
                                                "Type": "MASTER_NAME",
                                                "Value": "Org Master Account"
                                        },
                                        {
                                                "Type": "ORGANIZATION_FEATURE_SET",
                                                "Value": "ALL"
                                        }
                                ],
                                "Type": "ORGANIZATION",
                                "Value": "o-exampleorgid"
                        },
                        {
                                "Type": "EMAIL",
                                "Value": "juan@example.com"
                        }
                ],
                "State": "ACCEPTED"
        }
}
```
+  Einzelheiten zur API finden Sie [AcceptHandshake](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/accept-handshake.html)in der *AWS CLI Befehlsreferenz*. 

### `Richtlinie anhängen`
<a name="organizations_AttachPolicy_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `attach-policy`

**AWS CLI**  
**So hängen Sie eine Richtlinie an ein Stammverzeichnis, eine Organisationsrichtlinie oder ein Konto an**  
**Beispiel 1**  
Das folgende Beispiel zeigt, wie Sie eine Service-Kontrollrichtlinie (SCP) an eine Organisationseinheit anfügen:  

```
aws organizations attach-policy
                --policy-id {{p-examplepolicyid111}}
                --target-id {{ou-examplerootid111-exampleouid111}}
```
**Beispiel 2**  
Das folgende Beispiel zeigt, wie Sie eine Service-Kontrollrichtlinie direkt an ein Konto anfügen:  

```
aws organizations attach-policy
                --policy-id {{p-examplepolicyid111}}
                --target-id {{333333333333}}
```
+  Einzelheiten zur API finden Sie [AttachPolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/attach-policy.html)in der *AWS CLI Befehlsreferenz*. 

### `Handshake abbrechen`
<a name="organizations_CancelHandshake_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `cancel-handshake`

**AWS CLI**  
**So stornieren Sie einen Handshake von einem anderen Konto**  
Bill hat eine Einladung an Susans Konto gesendet, seiner Organisation beizutreten. Er ändert seine Meinung und beschließt, die Einladung zu stornieren, bevor Susan sie annimmt. Im folgenden Beispiel wird Bills Absage angezeigt:  

```
aws organizations cancel-handshake --handshake-id {{h-examplehandshakeid111}}
```
Die Ausgabe umfasst ein Handshake-Objekt, das anzeigt, dass der Status jetzt `CANCELED` lautet:  

```
{
        "Handshake": {
                "Id": "h-examplehandshakeid111",
                "State":"CANCELED",
                "Action": "INVITE",
                "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
                "Parties": [
                        {
                                "Id": "o-exampleorgid",
                                "Type": "ORGANIZATION"
                        },
                        {
                                "Id": "susan@example.com",
                                "Type": "EMAIL"
                        }
                ],
                "Resources": [
                        {
                                "Type": "ORGANIZATION",
                                "Value": "o-exampleorgid",
                                "Resources": [
                                        {
                                                "Type": "MASTER_EMAIL",
                                                "Value": "bill@example.com"
                                        },
                                        {
                                                "Type": "MASTER_NAME",
                                                "Value": "Master Account"
                                        },
                                        {
                                                "Type": "ORGANIZATION_FEATURE_SET",
                                                "Value": "CONSOLIDATED_BILLING"
                                        }
                                ]
                        },
                        {
                                "Type": "EMAIL",
                                "Value": "anika@example.com"
                        },
                        {
                                "Type": "NOTES",
                                "Value": "This is a request for Susan's account to join Bob's organization."
                        }
                ],
                "RequestedTimestamp": 1.47008383521E9,
                "ExpirationTimestamp": 1.47137983521E9
        }
}
```
+  Einzelheiten zur API finden Sie [CancelHandshake](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/cancel-handshake.html)in der *AWS CLI Befehlsreferenz*. 

### `Konto erstellen`
<a name="organizations_CreateAccount_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `create-account`

**AWS CLI**  
**So erstellen Sie ein Mitgliedskonto, das automatisch Teil Ihrer Organisation ist**  
Das folgende Beispiel zeigt, wie ein Mitgliedskonto in einer Organisation erstellt wird. Das Mitgliedskonto ist mit dem Namen Production Account und der E-Mail-Adresse susan@example.com konfiguriert. Organizations erstellt automatisch eine IAM-Rolle mit dem Standardnamen von, OrganizationAccountAccessRole da der RoleName-Parameter nicht angegeben ist. Außerdem ist die Einstellung, die IAM-Benutzern oder -Rollen mit ausreichenden Berechtigungen den Zugriff auf Kontoabrechnungsdaten ermöglicht, auf den Standardwert ALLOW gesetzt, da der IamUserAccessToBilling Parameter nicht angegeben ist. Organizations sendet Susan automatisch eine „Willkommen bei AWS“ -E-Mail:  

```
aws organizations create-account --email {{susan@example.com}} --account-name {{"Production Account"}}
```
Die Ausgabe umfasst ein Anforderungsobjekt, aus dem hervorgeht, dass der Status jetzt `IN_PROGRESS` lautet:  

```
{
        "CreateAccountStatus": {
                "State": "IN_PROGRESS",
                "Id": "car-examplecreateaccountrequestid111"
        }
}
```
Sie können später den aktuellen Status der Anforderung abfragen, indem Sie den ID-Antwortwert für den Befehl describe-create-account-status als Wert für den Parameter create-account-request-id angeben.  
Weitere Informationen finden Sie unter Erstellen eines AWS Kontos in Ihrer Organisation im *Benutzerhandbuch für AWS Organizations*.  
+  Einzelheiten zur API finden Sie [CreateAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/create-account.html)unter *AWS CLI Befehlsreferenz*. 

### `Organisation erstellen`
<a name="organizations_CreateOrganization_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `create-organization`

**AWS CLI**  
**Beispiel 1: So erstellen Sie eine neue Organisation**  
Bill möchte eine Organisation mit den Anmeldeinformationen des Kontos 111111111111 erstellen. Das folgende Beispiel zeigt, dass das Konto zum Hauptkonto in der neuen Organisation wird. Da er keinen Funktionsumfang angibt, sind in der neuen Organisation standardmäßig alle Funktionen aktiviert, und die Richtlinien zur Servicekontrollrichtlinien sind im Stammverzeichnis aktiviert.  

```
aws organizations create-organization
```
Die Ausgabe umfasst ein Organisationsobjekt mit Details zur neuen Organisation:  

```
{
        "Organization": {
                "AvailablePolicyTypes": [
                        {
                                "Status": "ENABLED",
                                "Type": "SERVICE_CONTROL_POLICY"
                        }
                ],
                "MasterAccountId": "111111111111",
                "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
                "MasterAccountEmail": "bill@example.com",
                "FeatureSet": "ALL",
                "Id": "o-exampleorgid",
                "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid"
        }
}
```
**Beispiel 2: So erstellen Sie eine neue Organisation, für die nur konsolidierte Rechnungsstellungsfunktionen aktiviert sind**  
Im folgenden Beispiel wird eine Organisation erstellt, die nur konsolidierte Rechnungsstellungsfunktionen unterstützt:  

```
aws organizations create-organization --feature-set {{CONSOLIDATED_BILLING}}
```
Die Ausgabe umfasst ein Organisationsobjekt mit Details zur neuen Organisation:  

```
{
        "Organization": {
                "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid",
                "AvailablePolicyTypes": [],
                "Id": "o-exampleorgid",
                "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
                "MasterAccountEmail": "bill@example.com",
                "MasterAccountId": "111111111111",
                "FeatureSet": "CONSOLIDATED_BILLING"
        }
}
```
Weitere Informationen finden Sie unter Erstellen einer Organisation im *Benutzerhandbuch für AWS Organizations*.  
+  Einzelheiten zur API finden Sie [CreateOrganization](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/create-organization.html)in der *AWS CLI Befehlsreferenz*. 

### `Organisationseinheit erstellen`
<a name="organizations_CreateOrganizationalUnit_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `create-organizational-unit`

**AWS CLI**  
**So erstellen Sie eine Organisationseinheit in einer Stamm- oder übergeordneten Organisationseinheit**  
Das folgende Beispiel zeigt, wie eine Organisationseinheit mit dem Namen AccountingOU erstellt wird:  

```
aws organizations create-organizational-unit --parent-id {{r-examplerootid111}} --name {{AccountingOU}}
```
Die Ausgabe umfasst ein organizationalUnit-Objekt mit Details zur neuen Organisationseinheit:  

```
{
        "OrganizationalUnit": {
                "Id": "ou-examplerootid111-exampleouid111",
                "Arn": "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
                "Name": "AccountingOU",
                "Path": "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid111/"
        }
}
```
+  Einzelheiten zur API finden Sie [CreateOrganizationalUnit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/create-organizational-unit.html)in der *AWS CLI Befehlsreferenz*. 

### `create-policy`
<a name="organizations_CreatePolicy_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`create-policy`.

**AWS CLI**  
**Beispiel 1: So erstellen Sie eine Richtlinie mit einer Textquelldatei für die JSON-Richtlinie**  
Das folgende Beispiel zeigt, wie Sie eine Service-Kontrollrichtlinie (SCP) namens `AllowAllS3Actions` erstellen: Der Richtlinieninhalt stammt aus einer Datei auf dem lokalen Computer namens `policy.json`.  

```
aws organizations create-policy --content {{file://policy.json}} --name {{AllowAllS3Actions,}} --type {{SERVICE_CONTROL_POLICY}} --description {{"Allows delegation of all S3 actions"}}
```
Die Ausgabe umfasst ein Richtlinienobjekt mit Details zur neuen Richtlinie:  

```
{
        "Policy": {
                "Content": "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"s3:*\"],\"Resource\":[\"*\"]}]}",
                "PolicySummary": {
                        "Arn": "arn:aws:organizations::o-exampleorgid:policy/service_control_policy/p-examplepolicyid111",
                        "Description": "Allows delegation of all S3 actions",
                        "Name": "AllowAllS3Actions",
                        "Type":"SERVICE_CONTROL_POLICY"
                }
        }
}
```
**Beispiel 2: So erstellen Sie eine Richtlinie mit einer JSON-Richtlinie als Parameter**  
Das folgende Beispiel zeigt, wie Sie dasselbe SCP erstellen, diesmal indem Sie den Richtlinieninhalt als JSON-Zeichenfolge in den Parameter einbetten. Die Zeichenfolge muss mit Backslashes vor den doppelten Anführungszeichen maskiert werden, um sicherzustellen, dass sie im Parameter, der selbst von doppelten Anführungszeichen umgeben ist, als Literale behandelt werden:  

```
aws organizations create-policy --content "{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Action\":[\"s3:*\"],\"Resource\":[\"*\"]}]}" --name {{AllowAllS3Actions}} --type {{SERVICE_CONTROL_POLICY}} --description {{"Allows delegation of all S3 actions"}}
```
Weitere Informationen zum Erstellen und Verwenden von Richtlinien in Ihrer Organisation finden Sie unter „Verwalten von Organisationsrichtlinien“ im *Benutzerhandbuch für AWS Organizations*.  
+  Einzelheiten zur API finden Sie [CreatePolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/create-policy.html)in der *AWS CLI Befehlsreferenz*. 

### `Handshake ablehnen`
<a name="organizations_DeclineHandshake_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `decline-handshake`

**AWS CLI**  
**So lehnen Sie einen Handshake von einem anderen Konto ab**  
Das folgende Beispiel zeigt, dass Susan, eine Administratorin, die Eigentümerin des Kontos 222222222222 ist, eine Einladung ablehnt, Bills Organisation beizutreten. Der DeclineHandshake Vorgang gibt ein Handshake-Objekt zurück, das anzeigt, dass der Status jetzt DECLINED lautet:  

```
aws organizations decline-handshake --handshake-id {{h-examplehandshakeid111}}
```
Die Ausgabe umfasst ein Handshake-Objekt, das anzeigt, dass der neue Status jetzt `DECLINED` lautet:  

```
{
        "Handshake": {
                "Id": "h-examplehandshakeid111",
                "State": "DECLINED",
                "Resources": [
                        {
                                "Type": "ORGANIZATION",
                                "Value": "o-exampleorgid",
                                "Resources": [
                                        {
                                                "Type": "MASTER_EMAIL",
                                                "Value": "bill@example.com"
                                        },
                                        {
                                                "Type": "MASTER_NAME",
                                                "Value": "Master Account"
                                        }
                                ]
                        },
                        {
                                "Type": "EMAIL",
                                "Value": "susan@example.com"
                        },
                        {
                                "Type": "NOTES",
                                "Value": "This is an invitation to Susan's account to join the Bill's organization."
                        }
                ],
                "Parties": [
                        {
                                "Type": "EMAIL",
                                "Id": "susan@example.com"
                        },
                        {
                                "Type": "ORGANIZATION",
                                "Id": "o-exampleorgid"
                        }
                ],
                "Action": "INVITE",
                "RequestedTimestamp": 1470684478.687,
                "ExpirationTimestamp": 1471980478.687,
                "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111"
        }
}
```
+  Einzelheiten zur API finden Sie [DeclineHandshake](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/decline-handshake.html)in der *AWS CLI Befehlsreferenz.* 

### `Organisation löschen`
<a name="organizations_DeleteOrganization_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `delete-organization`

**AWS CLI**  
**Um eine Organisation zu löschen**  
Im folgenden Beispiel wird gezeigt, wie eine Organisation gelöscht wird. Um diesen Vorgang ausführen zu können, müssen Sie Administrator des Hauptkontos in der Organisation sein. Im Beispiel wird davon ausgegangen, dass Sie zuvor alle Mitgliedskonten, Organisationseinheiten und Richtlinien aus der Organisation entfernt haben:  

```
aws organizations delete-organization
```
+  Einzelheiten zur API finden Sie [DeleteOrganization](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/delete-organization.html)in der *AWS CLI Befehlsreferenz*. 

### `Organisationseinheit löschen`
<a name="organizations_DeleteOrganizationalUnit_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `delete-organizational-unit`

**AWS CLI**  
**Um eine Organisationseinheit zu löschen**  
Im folgenden Beispiel wird gezeigt, wie eine Organisationseinheit gelöscht wird. Im Beispiel wird davon ausgegangen, dass Sie zuvor alle Konten und andere Organisationseinheiten aus der Organisationseinheit entfernt haben:  

```
aws organizations delete-organizational-unit --organizational-unit-id {{ou-examplerootid111-exampleouid111}}
```
+  Einzelheiten zur API finden Sie [DeleteOrganizationalUnit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/delete-organizational-unit.html)in der *AWS CLI Befehlsreferenz*. 

### `delete-policy`
<a name="organizations_DeletePolicy_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`delete-policy`.

**AWS CLI**  
**So löschen Sie eine Richtlinie**  
Das folgende Codebeispiel zeigt, wie Sie eine Richtlinie aus einer Organisation löschen. Im Beispiel wird davon ausgegangen, dass Sie die Richtlinie zuvor von allen Entitäten getrennt haben:  

```
aws organizations delete-policy --policy-id {{p-examplepolicyid111}}
```
+  Einzelheiten zur API finden Sie [DeletePolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/delete-policy.html)in der *AWS CLI Befehlsreferenz*. 

### `Account beschreiben`
<a name="organizations_DescribeAccount_cli_topic"></a>

Das folgende Codebeispiel zeigt, wie man es benutzt. `describe-account`

**AWS CLI**  
**So rufen Sie die Details zu einem Konto ab**  
Das folgende Beispiel zeigt, wie die Details eines angegebenen Kontos abgerufen werden:  

```
aws organizations describe-account --account-id {{555555555555}}
```
Die Ausgabe zeigt ein Kontoobjekt mit den Details zum Konto:  

```
{
        "Account": {
                "Id": "555555555555",
                "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/555555555555",
                "Name": "Beta account",
                "Email": "anika@example.com",
                "JoinedMethod": "INVITED",
                "JoinedTimeStamp": 1481756563.134,
                "Paths": [
                        "o-exampleorgid/r-examplerootid111/555555555555/"
                ],
                "State": "ACTIVE",
                "Status": "ACTIVE"
        }
}
```
+  Einzelheiten zur API finden Sie [DescribeAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/describe-account.html)in der *AWS CLI Befehlsreferenz*. 

### `Account-Status beschreiben-erstellen-`
<a name="organizations_DescribeCreateAccountStatus_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `describe-create-account-status`

**AWS CLI**  
**So rufen Sie den neuesten Status einer Anfrage zur Kontoerstellung ab**  
Das folgende Beispiel zeigt, wie der aktuelle Status einer früheren Anfrage zur Kontoerstellung in einer Organisation abgefragt wird. Die angegebene --request-id stammt aus der Antwort auf den ursprünglichen Aufruf von create-account. Die Anfrage zur Kontoerstellung zeigt anhand des Statusfeldes, dass Organizations die Erstellung des Kontos erfolgreich abgeschlossen haben.  
Befehl:  

```
aws organizations describe-create-account-status --create-account-request-id {{car-examplecreateaccountrequestid111}}
```
Ausgabe:  

```
{
  "CreateAccountStatus": {
    "State": "SUCCEEDED",
    "AccountId": "555555555555",
    "AccountName": "Beta account",
    "RequestedTimestamp": 1470684478.687,
    "CompletedTimestamp": 1470684532.472,
    "Id": "car-examplecreateaccountrequestid111"
  }
}
```
+  Einzelheiten zur API finden Sie [DescribeCreateAccountStatus](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/describe-create-account-status.html)in der *AWS CLI Befehlsreferenz*. 

### `beschreibe den Handshake`
<a name="organizations_DescribeHandshake_cli_topic"></a>

Das folgende Codebeispiel zeigt, wie man es benutzt. `describe-handshake`

**AWS CLI**  
**So rufen Sie Informationen über einen Handshake ab**  
Im folgenden Beispiel wird gezeigt, wie Sie Details zu einem Handshake anfordern. Die Handshake-ID stammt entweder aus dem ursprünglichen Aufruf an `InviteAccountToOrganization` oder aus einem Aufruf an `ListHandshakesForAccount` oder `ListHandshakesForOrganization`:  

```
aws organizations describe-handshake --handshake-id {{h-examplehandshakeid111}}
```
Die Ausgabe umfasst ein Handshake-Objekt, das alle Details zum angeforderten Handshake enthält:  

```
{
        "Handshake": {
                "Id": "h-examplehandshakeid111",
                "State": "OPEN",
                "Resources": [
                        {
                                "Type": "ORGANIZATION",
                                "Value": "o-exampleorgid",
                                "Resources": [
                                        {
                                                "Type": "MASTER_EMAIL",
                                                "Value": "bill@example.com"
                                        },
                                        {
                                                "Type": "MASTER_NAME",
                                                "Value": "Master Account"
                                        }
                                ]
                        },
                        {
                                "Type": "EMAIL",
                                "Value": "anika@example.com"
                        }
                ],
                "Parties": [
                        {
                                "Type": "ORGANIZATION",
                                "Id": "o-exampleorgid"
                        },
                        {
                                "Type": "EMAIL",
                                "Id": "anika@example.com"
                        }
                ],
                "Action": "INVITE",
                "RequestedTimestamp": 1470158698.046,
                "ExpirationTimestamp": 1471454698.046,
                "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111"
        }
}
```
+  Einzelheiten zur API finden Sie [DescribeHandshake](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/describe-handshake.html)in der *AWS CLI Befehlsreferenz*. 

### `Organisation beschreiben`
<a name="organizations_DescribeOrganization_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `describe-organization`

**AWS CLI**  
**So rufen Sie Informationen über die aktuelle Organisation ab**  
Im folgenden Beispiel wird gezeigt, wie Sie Details zu einer Organisation anfordern:  

```
aws organizations describe-organization
```
Die Ausgabe umfasst ein Organisationsobjekt mit Details zur neuen Organisation:  

```
{
        "Organization": {
                "MasterAccountArn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
                "MasterAccountEmail": "bill@example.com",
                "MasterAccountId": "111111111111",
                "Id": "o-exampleorgid",
                "FeatureSet": "ALL",
                "Arn": "arn:aws:organizations::111111111111:organization/o-exampleorgid",
                "AvailablePolicyTypes": [
                        {
                                "Status": "ENABLED",
                                "Type": "SERVICE_CONTROL_POLICY"
                        }
                ]
        }
}
```
+  Einzelheiten zur API finden Sie [DescribeOrganization](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/describe-organization.html)in der *AWS CLI Befehlsreferenz*. 

### `describe-organizational-unit`
<a name="organizations_DescribeOrganizationalUnit_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`describe-organizational-unit`.

**AWS CLI**  
**So rufen Sie Informationen über eine Organisationseinheit ab**  
Im folgenden Beispiel für `describe-organizational-unit` werden Details zu einer Organisationseinheit abgefragt.  

```
aws organizations describe-organizational-unit \
    --organizational-unit-id {{ou-examplerootid111-exampleouid111}}
```
Ausgabe:  

```
{
    "OrganizationalUnit": {
        "Name": "Accounting Group",
        "Arn": "arn:aws:organizations::123456789012:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
        "Id": "ou-examplerootid111-exampleouid111",
        "Path": "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid111/"
    }
}
```
+  Einzelheiten zur API finden Sie [DescribeOrganizationalUnit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/describe-organizational-unit.html)in der *AWS CLI Befehlsreferenz*. 

### `Richtlinie beschreiben`
<a name="organizations_DescribePolicy_cli_topic"></a>

Das folgende Codebeispiel zeigt, wie man es benutzt. `describe-policy`

**AWS CLI**  
**So rufen Sie Informationen zu einer Richtlinie ab**  
Das folgende Beispiel zeigt, wie Sie Informationen zu einer Richtlinie anfordern:  

```
aws organizations describe-policy --policy-id {{p-examplepolicyid111}}
```
Die Ausgabe umfasst ein Richtlinienobjekt, das Details zur Richtlinie enthält:  

```
{
        "Policy": {
                "Content": "{\n  \"Version\": \"2012-10-17\",\n  \"Statement\": [\n    {\n      \"Effect\": \"Allow\",\n      \"Action\": \"*\",\n      \"Resource\": \"*\"\n    }\n  ]\n}",
                "PolicySummary": {
                        "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
                        "Type": "SERVICE_CONTROL_POLICY",
                        "Id": "p-examplepolicyid111",
                        "AwsManaged": false,
                        "Name": "AllowAllS3Actions",
                        "Description": "Enables admins to delegate S3 permissions"
                }
        }
}
```
+  Einzelheiten zur API finden Sie [DescribePolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/describe-policy.html)in der *AWS CLI Befehlsreferenz*. 

### `Detach-Richtlinie`
<a name="organizations_DetachPolicy_cli_topic"></a>

Das folgende Codebeispiel zeigt, wie man es benutzt. `detach-policy`

**AWS CLI**  
**So trennen Sie eine Richtlinie von einem Root, einer Organisationseinheit oder einem Konto**  
Das folgende Codebeispiel zeigt, wie Sie eine Richtlinie von einer Organisationseinheit trennen.  

```
aws organizations  detach-policy  --target-id {{ou-examplerootid111-exampleouid111}} --policy-id {{p-examplepolicyid111}}
```
+  Einzelheiten zur API finden Sie [DetachPolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/detach-policy.html)in der *AWS CLI Befehlsreferenz*. 

### `Richtlinientyp deaktivieren`
<a name="organizations_DisablePolicyType_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `disable-policy-type`

**AWS CLI**  
**So deaktivieren Sie einen Richtlinientyp in einem Stammverzeichnis**  
Das folgende Beispiel zeigt, wie Sie den Service-Kontrollrichtlinientyp (SCP) in einem Stammverzeichnis deaktivieren:  

```
aws organizations disable-policy-type --root-id {{r-examplerootid111}} --policy-type {{SERVICE_CONTROL_POLICY}}
```
Die Ausgabe zeigt, dass das PolicyTypes Antwortelement SERVICE\_CONTROL\_POLICY nicht mehr enthält:  

```
{
        "Root": {
                "PolicyTypes": [],
                "Name": "Root",
                "Id": "r-examplerootid111",
                "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111"
        }
}
```
+  *Einzelheiten zur API finden Sie in der Befehlsreferenz [DisablePolicyType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/disable-policy-type.html).AWS CLI * 

### `Aktiviere alle Funktionen`
<a name="organizations_EnableAllFeatures_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `enable-all-features`

**AWS CLI**  
**So aktivieren Sie alle Features in einer Organisation**  
Dieses Beispiel zeigt, wie der Administrator alle eingeladenen Konten in der Organisation auffordert, alle aktivierten Funktionen in der Organisation zu genehmigen. AWS Organizations senden eine E-Mail an die Adresse, die für jedes Konto eines eingeladenen Mitglieds registriert ist, und bittet den Inhaber, die Änderung aller Funktionen zu genehmigen, indem er den gesendeten Handschlag akzeptiert. Nachdem alle Konten eingeladener Mitglieder den Handshake akzeptiert haben, kann der Organisationsadministrator die Änderung an allen Funktionen abschließen. Benutzer mit den entsprechenden Berechtigungen können Richtlinien erstellen und diese auf Stammkonten, Organisationseinheiten und Konten anwenden:  

```
aws organizations enable-all-features
```
Die Ausgabe ist ein Handshake-Objekt, das zur Genehmigung an alle eingeladenen Mitgliedskonten gesendet wird:  

```
{
        "Handshake": {
                "Action": "ENABLE_ALL_FEATURES",
                "Arn":"arn:aws:organizations::111111111111:handshake/o-exampleorgid/enable_all_features/h-examplehandshakeid111",
                "ExpirationTimestamp":1.483127868609E9,
                "Id":"h-examplehandshakeid111",
                "Parties": [
                        {
                                "id":"o-exampleorgid",
                                "type":"ORGANIZATION"
                        }
                ],
                "requestedTimestamp":1.481831868609E9,
                "resources": [
                        {
                                "type":"ORGANIZATION",
                                "value":"o-exampleorgid"
                        }
                ],
                "state":"REQUESTED"
        }
}
```
+  Einzelheiten zur API finden Sie [EnableAllFeatures](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/enable-all-features.html)in der *AWS CLI Befehlsreferenz.* 

### `Richtlinientyp aktivieren`
<a name="organizations_EnablePolicyType_cli_topic"></a>

Das folgende Codebeispiel zeigt, wie man es benutzt. `enable-policy-type`

**AWS CLI**  
**So aktivieren Sie die Verwendung eines Richtlinientyps in einem Stammverzeichnis**  
Das folgende Beispiel zeigt, wie Sie den Service-Kontrollrichtlinientyp (SCP) in einem Stammverzeichnis aktivieren:  

```
aws organizations enable-policy-type --root-id {{r-examplerootid111}} --policy-type {{SERVICE_CONTROL_POLICY}}
```
Die Ausgabe zeigt ein Stammobjekt mit einem policyTypes-Antwortelement, das anzeigt, dass SCPs jetzt aktiviert sind:  

```
{
        "Root": {
                "PolicyTypes": [
                        {
                                "Status":"ENABLED",
                                "Type":"SERVICE_CONTROL_POLICY"
                        }
                ],
                "Id": "r-examplerootid111",
                "Name": "Root",
                "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111"
        }
}
```
+  Einzelheiten zur API finden Sie [EnablePolicyType](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/enable-policy-type.html)in der *AWS CLI Befehlsreferenz*. 

### `Konto zur Organisation einladen`
<a name="organizations_InviteAccountToOrganization_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `invite-account-to-organization`

**AWS CLI**  
**So laden Sie ein Konto zum Beitritt zu einer Organisation ein**  
Das folgende Beispiel zeigt, wie das Hauptkonto bill@example.com das Konto juan@example.com einlädt, einer Organisation beizutreten:  

```
aws organizations invite-account-to-organization --target '{{{"Type": "EMAIL", "Id": "juan@example.com"}}}' --notes {{"This is a request for Juan's account to join Bill's organization."}}
```
Die Ausgabe umfasst eine Handshake-Struktur, die zeigt, was an das eingeladene Konto gesendet wird:  

```
{
        "Handshake": {
                "Action": "INVITE",
                "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
                "ExpirationTimestamp": 1482952459.257,
                "Id": "h-examplehandshakeid111",
                "Parties": [
                        {
                                "Id": "o-exampleorgid",
                                "Type": "ORGANIZATION"
                        },
                        {
                                "Id": "juan@example.com",
                                "Type": "EMAIL"
                        }
                ],
                "RequestedTimestamp": 1481656459.257,
                "Resources": [
                        {
                                "Resources": [
                                        {
                                                "Type": "MASTER_EMAIL",
                                                "Value": "bill@amazon.com"
                                        },
                                        {
                                                "Type": "MASTER_NAME",
                                                "Value": "Org Master Account"
                                        },
                                        {
                                                "Type": "ORGANIZATION_FEATURE_SET",
                                                "Value": "FULL"
                                        }
                                ],
                                "Type": "ORGANIZATION",
                                "Value": "o-exampleorgid"
                        },
                        {
                                "Type": "EMAIL",
                                "Value": "juan@example.com"
                        }
                ],
                "State": "OPEN"
        }
}
```
+  Einzelheiten zur API finden Sie [InviteAccountToOrganization](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/invite-account-to-organization.html)in der *AWS CLI Befehlsreferenz*. 

### `Organisation verlassen`
<a name="organizations_LeaveOrganization_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `leave-organization`

**AWS CLI**  
**So verlassen Sie eine Organisation als Mitgliedskonto**  
Das folgende Beispiel zeigt den Administrator eines Mitgliedskontos, der beantragt, die Organisation zu verlassen, der er aktuell angehört:  

```
aws organizations leave-organization
```
+  Einzelheiten zur API finden Sie [LeaveOrganization](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/leave-organization.html)in der *AWS CLI Befehlsreferenz*. 

### `Benutzerkonten für Eltern auflisten`
<a name="organizations_ListAccountsForParent_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `list-accounts-for-parent`

**AWS CLI**  
**So rufen Sie eine Liste aller Konten in einem bestimmten übergeordneten Stammverzeichnis oder einer Organisationseinheit ab**  
Das folgende Beispiel zeigt, wie eine Liste der Konten in einer Organisationseinheit angefordert wird:  

```
aws organizations list-accounts-for-parent --parent-id {{ou-examplerootid111-exampleouid111}}
```
Die Ausgabe enthält eine Liste von Kontozusammenfassungsobjekten.  

```
{
        "Accounts": [
                {
                        "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333",
                        "JoinedMethod": "INVITED",
                        "JoinedTimestamp": 1481835795.536,
                        "Id": "333333333333",
                        "Name": "Development Account",
                        "Email": "juan@example.com",
                        "Paths": [
                                "o-exampleorgid/r-examplerootid111/111111111111/"
                        ],
                        "State": "ACTIVE",
                        "Status": "ACTIVE"
                },
                {
                        "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/444444444444",
                        "JoinedMethod": "INVITED",
                        "JoinedTimestamp": 1481835812.143,
                        "Id": "444444444444",
                        "Name": "Test Account",
                        "Email": "anika@example.com",
                        "Paths": [
                                "o-exampleorgid/r-examplerootid111/111111111111/"
                        ],
                        "State": "ACTIVE",
                        "Status": "ACTIVE"
                }
        ]
}
```
+  Einzelheiten zur API finden Sie [ListAccountsForParent](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-accounts-for-parent.html)in der *AWS CLI Befehlsreferenz*. 

### `Konten auflisten`
<a name="organizations_ListAccounts_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `list-accounts`

**AWS CLI**  
**So rufen Sie eine Liste aller Konten in einer Organisation ab**  
Das folgende Beispiel zeigt, wie Sie eine Liste der Konten in einer Organisation anfordern:  

```
aws organizations list-accounts
```
Die Ausgabe enthält eine Liste von Kontozusammenfassungsobjekten.  

```
{
        "Accounts": [
                {
                        "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/111111111111",
                        "JoinedMethod": "INVITED",
                        "JoinedTimestamp": 1481830215.45,
                        "Id": "111111111111",
                        "Name": "Master Account",
                        "Email": "bill@example.com",
                        "Paths": [
                                "o-exampleorgid/r-examplerootid111/111111111111/"
                        ],
                        "State": "ACTIVE",
                        "Status": "ACTIVE"
                },
                {
                        "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/222222222222",
                        "JoinedMethod": "INVITED",
                        "JoinedTimestamp": 1481835741.044,
                        "Id": "222222222222",
                        "Name": "Production Account",
                        "Email": "alice@example.com",
                        "Paths": [
                                "o-exampleorgid/r-examplerootid111/111111111111/"
                        ],
                        "State": "ACTIVE",
                        "Status": "ACTIVE"
                },
                {
                        "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333",
                        "JoinedMethod": "INVITED",
                        "JoinedTimestamp": 1481835795.536,
                        "Id": "333333333333",
                        "Name": "Development Account",
                        "Email": "juan@example.com",
                        "Paths": [
                                "o-exampleorgid/r-examplerootid111/111111111111/"
                        ],
                        "State": "ACTIVE",
                        "Status": "ACTIVE"
                },
                {
                        "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/444444444444",
                        "JoinedMethod": "INVITED",
                        "JoinedTimestamp": 1481835812.143,
                        "Id": "444444444444",
                        "Name": "Test Account",
                        "Email": "anika@example.com",
                        "Paths": [
                                "o-exampleorgid/r-examplerootid111/111111111111/"
                        ],
                        "State": "ACTIVE",
                        "Status": "ACTIVE"
                }
        ]
}
```
+  Einzelheiten zur API finden Sie [ListAccounts](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-accounts.html)in der *AWS CLI Befehlsreferenz*. 

### `list-children`
<a name="organizations_ListChildren_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-children`.

**AWS CLI**  
**So rufen Sie die untergeordneten Konten und Organisationseinheiten einer übergeordneten Organisationseinheit oder einer Stammorganisation ab**  
Im folgenden Beispiel wird gezeigt, wie Sie das Stammkonto oder die Organisationseinheit auflisten, die dieses Konto 4444444444 enthält:  

```
aws organizations list-children --child-type {{ORGANIZATIONAL_UNIT}} --parent-id {{ou-examplerootid111-exampleouid111}}
```
Die Ausgabe zeigt die beiden untergeordneten Organisationseinheiten, die in der übergeordneten Organisationseinheit enthalten sind:  

```
{
        "Children": [
                {
                        "Id": "ou-examplerootid111-exampleouid111",
                        "Type":"ORGANIZATIONAL_UNIT"
                },
                {
                        "Id":"ou-examplerootid111-exampleouid222",
                        "Type":"ORGANIZATIONAL_UNIT"
                }
        ]
}
```
+  Einzelheiten zur API finden Sie [ListChildren](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-children.html)in der *AWS CLI Befehlsreferenz*. 

### `Status eines Benutzerkontos auflisten`
<a name="organizations_ListCreateAccountStatus_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `list-create-account-status`

**AWS CLI**  
**Beispiel 1: So rufen Sie eine Liste der Anfragen zur Kontoerstellung ab, die in der aktuellen Organisation gestellt wurden**  
Das folgende Beispiel zeigt, wie Sie eine Liste von Anfragen zur Kontoerstellung für eine Organisation anfordern, die erfolgreich abgeschlossen wurden:  

```
aws organizations list-create-account-status --states {{SUCCEEDED}}
```
Die Ausgabe umfasst eine Reihe von Objekten mit Informationen zu jeder Anfrage.  

```
{
        "CreateAccountStatuses": [
                {
                        "AccountId": "444444444444",
                        "AccountName": "Developer Test Account",
                        "CompletedTimeStamp": 1481835812.143,
                        "Id": "car-examplecreateaccountrequestid111",
                        "RequestedTimeStamp": 1481829432.531,
                        "State": "SUCCEEDED"
                }
        ]
}
```
**Beispiel 2: So rufen Sie eine Liste der laufenden Anfragen zur Kontoerstellung ab, die in der aktuellen Organisation gestellt wurden**  
Im folgenden Beispiel wird eine Liste von Anfragen zur Kontoerstellung für eine Organisation abgerufen:  

```
aws organizations list-create-account-status --states {{IN_PROGRESS}}
```
Die Ausgabe umfasst eine Reihe von Objekten mit Informationen zu jeder Anfrage.  

```
{
        "CreateAccountStatuses": [
                {
                  "State": "IN_PROGRESS",
                  "Id": "car-examplecreateaccountrequestid111",
                  "RequestedTimeStamp": 1481829432.531,
                  "AccountName": "Production Account"
                }
        ]
}
```
+  Einzelheiten zur API finden Sie [ListCreateAccountStatus](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-create-account-status.html)in der *AWS CLI Befehlsreferenz*. 

### `list-handshakes-for-account`
<a name="organizations_ListHandshakesForAccount_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-handshakes-for-account`.

**AWS CLI**  
**So rufen Sie eine Liste der Handshakes ab, die an ein Konto gesendet wurden**  
Das folgende Beispiel zeigt, wie Sie eine Liste aller Handshakes abrufen, die mit dem Konto der Anmeldeinformationen verknüpft sind, die zum Aufrufen des Vorgangs verwendet wurden:  

```
aws organizations list-handshakes-for-account
```
Die Ausgabe umfasst eine Liste von Handshake-Strukturen mit Informationen zu jedem Handshake, einschließlich seines aktuellen Status:  

```
{
        "Handshake": {
                "Action": "INVITE",
                "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
                "ExpirationTimestamp": 1482952459.257,
                "Id": "h-examplehandshakeid111",
                "Parties": [
                        {
                                "Id": "o-exampleorgid",
                                "Type": "ORGANIZATION"
                        },
                        {
                                "Id": "juan@example.com",
                                "Type": "EMAIL"
                        }
                ],
                "RequestedTimestamp": 1481656459.257,
                "Resources": [
                        {
                                "Resources": [
                                        {
                                                "Type": "MASTER_EMAIL",
                                                "Value": "bill@amazon.com"
                                        },
                                        {
                                                "Type": "MASTER_NAME",
                                                "Value": "Org Master Account"
                                        },
                                        {
                                                "Type": "ORGANIZATION_FEATURE_SET",
                                                "Value": "FULL"
                                        }
                                ],
                                "Type": "ORGANIZATION",
                                "Value": "o-exampleorgid"
                        },
                        {
                                "Type": "EMAIL",
                                "Value": "juan@example.com"
                        }
                ],
                "State": "OPEN"
        }
}
```
+  Einzelheiten zur API finden Sie [ListHandshakesForAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-handshakes-for-account.html)in der *AWS CLI Befehlsreferenz*. 

### `list-handshakes-for-organization`
<a name="organizations_ListHandshakesForOrganization_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-handshakes-for-organization`.

**AWS CLI**  
**So rufen Sie eine Liste der Handshakes ab, die einer Organisation zugeordnet sind**  
Das folgende Beispiel zeigt, wie Sie eine Liste von Handshakes abrufen, die der aktuellen Organisation zugeordnet sind:  

```
aws organizations list-handshakes-for-organization
```
Die Ausgabe zeigt zwei Handshakes. Der erste ist eine Einladung zu Juans Konto und zeigt den Status OFFEN an. Der zweite ist eine Einladung zu Anikas Konto und zeigt den Status ACCEPTED an:  

```
{
        "Handshakes": [
                {
                        "Action": "INVITE",
                        "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
                        "ExpirationTimestamp": 1482952459.257,
                        "Id": "h-examplehandshakeid111",
                        "Parties": [
                                {
                                        "Id": "o-exampleorgid",
                                        "Type": "ORGANIZATION"
                                },
                                {
                                        "Id": "juan@example.com",
                                        "Type": "EMAIL"
                                }
                        ],
                        "RequestedTimestamp": 1481656459.257,
                        "Resources": [
                                {
                                        "Resources": [
                                                {
                                                        "Type": "MASTER_EMAIL",
                                                        "Value": "bill@amazon.com"
                                                },
                                                {
                                                        "Type": "MASTER_NAME",
                                                        "Value": "Org Master Account"
                                                },
                                                {
                                                        "Type": "ORGANIZATION_FEATURE_SET",
                                                        "Value": "FULL"
                                                }
                                        ],
                                        "Type": "ORGANIZATION",
                                        "Value": "o-exampleorgid"
                                },
                                {
                                        "Type": "EMAIL",
                                        "Value": "juan@example.com"
                                },
                                {
                                        "Type":"NOTES",
                                        "Value":"This is an invitation to Juan's account to join Bill's organization."
                                }
                        ],
                        "State": "OPEN"
                },
                {
                        "Action": "INVITE",
                        "State":"ACCEPTED",
                        "Arn": "arn:aws:organizations::111111111111:handshake/o-exampleorgid/invite/h-examplehandshakeid111",
                        "ExpirationTimestamp": 1.471797437427E9,
                        "Id": "h-examplehandshakeid222",
                        "Parties": [
                                {
                                        "Id": "o-exampleorgid",
                                        "Type": "ORGANIZATION"
                                },
                                {
                                        "Id": "anika@example.com",
                                        "Type": "EMAIL"
                                }
                        ],
                        "RequestedTimestamp": 1.469205437427E9,
                        "Resources": [
                                {
                                        "Resources": [
                                                {
                                                        "Type":"MASTER_EMAIL",
                                                        "Value":"bill@example.com"
                                                },
                                                {
                                                        "Type":"MASTER_NAME",
                                                        "Value":"Master Account"
                                                }
                                        ],
                                        "Type":"ORGANIZATION",
                                        "Value":"o-exampleorgid"
                                },
                                {
                                        "Type":"EMAIL",
                                        "Value":"anika@example.com"
                                },
                                {
                                        "Type":"NOTES",
                                        "Value":"This is an invitation to Anika's account to join Bill's organization."
                                }
                        ]
                }
        ]
}
```
+  Einzelheiten zur API finden Sie [ListHandshakesForOrganization](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-handshakes-for-organization.html)in der *AWS CLI Befehlsreferenz*. 

### `listet die Organisationseinheiten für das übergeordnete Objekt auf`
<a name="organizations_ListOrganizationalUnitsForParent_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `list-organizational-units-for-parent`

**AWS CLI**  
**So rufen Sie eine Liste der OUs in einer übergeordneten OU oder im Stammverzeichnis ab**  
Das folgende Beispiel zeigt, wie Sie eine Liste von OUs in einem angegebenen Root abrufen:  

```
aws organizations list-organizational-units-for-parent --parent-id {{r-examplerootid111}}
```
Die Ausgabe zeigt, dass das angegebene Stammverzeichnis zwei Organisationseinheiten enthält, und es werden Details zu jeder Organisationseinheit angezeigt:  

```
{
        "OrganizationalUnits": [
                {
                        "Name": "AccountingDepartment",
                        "Arn": "arn:aws:organizations::o-exampleorgid:ou/r-examplerootid111/ou-examplerootid111-exampleouid111",
                        "Id": "ou-examplerootid111-exampleouid111",
                        "Path": "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid111/"
                },
                {
                        "Name": "ProductionDepartment",
                        "Arn": "arn:aws:organizations::o-exampleorgid:ou/r-examplerootid111/ou-examplerootid111-exampleouid222",
                        "Id": "ou-examplerootid111-exampleouid222",
                        "Path": "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid222/"
                }
        ]
}
```
+  Einzelheiten zur API finden Sie [ListOrganizationalUnitsForParent](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-organizational-units-for-parent.html)in der *AWS CLI Befehlsreferenz*. 

### `Eltern auflisten`
<a name="organizations_ListParents_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `list-parents`

**AWS CLI**  
**So listen Sie die übergeordneten Organisationseinheiten oder Stammverzeichnisse für ein Konto oder eine untergeordnete Organisationseinheit auf**  
Im folgenden Beispiel wird gezeigt, wie Sie die Stamm- oder übergeordnete Organisationseinheit auflisten, die das Konto 444444444444 enthält:  

```
aws organizations list-parents --child-id {{444444444444}}
```
Die Ausgabe zeigt, dass sich das angegebene Konto in der Organisationseinheit mit der angegebenen ID befindet:  

```
{
  "Parents": [
        {
          "Id": "ou-examplerootid111-exampleouid111",
          "Type": "ORGANIZATIONAL_UNIT"
        }
  ]
}
```
+  Einzelheiten zur API finden Sie [ListParents](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-parents.html)in der *AWS CLI Befehlsreferenz*. 

### `listet Richtlinien für das Ziel auf`
<a name="organizations_ListPoliciesForTarget_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `list-policies-for-target`

**AWS CLI**  
**So rufen Sie eine Liste der SCPs ab, die direkt mit einem Konto verknüpft sind**  
Das folgende Beispiel zeigt, wie Sie eine Liste aller Service-Kontrollrichtlinien (SCPs) abrufen, die direkt mit einem Konto verknüpft sind, wie sie im Filter-Parameter angegeben sind:  

```
aws organizations list-policies-for-target --filter {{SERVICE_CONTROL_POLICY}} --target-id {{444444444444}}
```
Die Ausgabe umfasst eine Liste von Richtlinienstrukturen mit zusammenfassenden Informationen zu den Richtlinien. Die Liste enthält keine Richtlinien, die aufgrund der Vererbung von seinem Standort in einer Organisationseinheitenhierarchie für das Konto gelten:  

```
{
        "Policies": [
                {
                        "Type": "SERVICE_CONTROL_POLICY",
                        "Name": "AllowAllEC2Actions",
                        "AwsManaged", false,
                        "Id": "p-examplepolicyid222",
                        "Arn": "arn:aws:organizations::o-exampleorgid:policy/service_control_policy/p-examplepolicyid222",
                        "Description": "Enables account admins to delegate permissions for any EC2 actions to users and roles in their accounts."
                }
        ]
}
```
+  Einzelheiten zur API finden Sie [ListPoliciesForTarget](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-policies-for-target.html)in der *AWS CLI Befehlsreferenz*. 

### `list-policies`
<a name="organizations_ListPolicies_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-policies`.

**AWS CLI**  
**So rufen Sie eine Liste aller Richtlinien in einer Organisation eines bestimmten Typs ab**  
Das folgende Beispiel zeigt, wie Sie eine Liste von SCPs abrufen, wie sie im Filter-Parameter angegeben wird:  

```
aws organizations list-policies --filter {{SERVICE_CONTROL_POLICY}}
```
Die Ausgabe umfasst eine Liste von Richtlinien mit zusammenfassenden Informationen:  

```
{
        "Policies": [
                {
                        "Type": "SERVICE_CONTROL_POLICY",
                        "Name": "AllowAllS3Actions",
                        "AwsManaged": false,
                        "Id": "p-examplepolicyid111",
                        "Arn": "arn:aws:organizations::111111111111:policy/service_control_policy/p-examplepolicyid111",
                        "Description": "Enables account admins to delegate permissions for any S3 actions to users and roles in their accounts."
                },
                {
                        "Type": "SERVICE_CONTROL_POLICY",
                        "Name": "AllowAllEC2Actions",
                        "AwsManaged": false,
                        "Id": "p-examplepolicyid222",
                        "Arn": "arn:aws:organizations::111111111111:policy/service_control_policy/p-examplepolicyid222",
                        "Description": "Enables account admins to delegate permissions for any EC2 actions to users and roles in their accounts."
                },
                {
                        "AwsManaged": true,
                        "Description": "Allows access to every operation",
                        "Type": "SERVICE_CONTROL_POLICY",
                        "Id": "p-FullAWSAccess",
                        "Arn": "arn:aws:organizations::aws:policy/service_control_policy/p-FullAWSAccess",
                        "Name": "FullAWSAccess"
                }
        ]
}
```
+  Einzelheiten zur API finden Sie [ListPolicies](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-policies.html)in der *AWS CLI Befehlsreferenz*. 

### `list-roots`
<a name="organizations_ListRoots_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-roots`.

**AWS CLI**  
**So rufen Sie eine Liste der Stammverzeichnisse in einer Organisation ab**  
Dieses Beispiel zeigt, wie Sie die Liste der Stammverzeichnisse einer Organisation abrufen:  

```
aws organizations list-roots
```
Die Ausgabe umfasst eine Liste von Stammstrukturen mit zusammenfassenden Informationen:  

```
{
        "Roots": [
                {
                        "Name": "Root",
                        "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
                        "Id": "r-examplerootid111",
                        "PolicyTypes": [
                                {
                                        "Status":"ENABLED",
                                        "Type":"SERVICE_CONTROL_POLICY"
                                }
                        ]
                }
        ]
}
```
+  Einzelheiten zur API finden Sie [ListRoots](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-roots.html)in der *AWS CLI Befehlsreferenz*. 

### `listet Ziele für Richtlinien auf`
<a name="organizations_ListTargetsForPolicy_cli_topic"></a>

Das folgende Codebeispiel zeigt, wie man es benutzt. `list-targets-for-policy`

**AWS CLI**  
**So listen Sie alle Stammverzeichnisse, Organisationseinheiten und Konten auf, denen eine Richtlinie zugewiesen ist**  
Das folgende Beispiel zeigt alle Anhänge an Stammverzeichnisse, Organisationseinheiten und Konten für die angegebene Richtlinie.  

```
aws organizations list-targets-for-policy --policy-id {{p-FullAWSAccess}}
```
Die Ausgabe umfasst eine Liste von Anhangobjekten mit zusammenfassenden Informationen zu den Stammverzeichnissen, Organisationseinheiten und Konten, an die die Richtlinie angefügt ist:  

```
{
        "Targets": [
                {
                        "Arn": "arn:aws:organizations::111111111111:root/o-exampleorgid/r-examplerootid111",
                        "Name": "Root",
                        "TargetId":"r-examplerootid111",
                        "Type":"ROOT"
                },
                {
                        "Arn": "arn:aws:organizations::111111111111:account/o-exampleorgid/333333333333;",
                        "Name": "Developer Test Account",
                        "TargetId": "333333333333",
                        "Type": "ACCOUNT"
                },
                {
                        "Arn":"arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
                        "Name":"Accounting",
                        "TargetId":"ou-examplerootid111-exampleouid111",
                        "Type":"ORGANIZATIONAL_UNIT"
                }
        ]
}
```
+  Einzelheiten zur API finden Sie [ListTargetsForPolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/list-targets-for-policy.html)in der *AWS CLI Befehlsreferenz*. 

### `Konto verschieben`
<a name="organizations_MoveAccount_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `move-account`

**AWS CLI**  
**So verschieben Sie ein Konto zwischen Stammverzeichnissen oder Organisationseinheiten**  
Das folgende Beispiel zeigt, wie Sie das Hauptkonto in der Organisation vom Stammverzeichnis in eine Organisationseinheit verschieben:  

```
aws organizations move-account --account-id {{333333333333}} --source-parent-id {{r-examplerootid111}} --destination-parent-id {{ou-examplerootid111-exampleouid111}}
```
+  Einzelheiten zur API finden Sie [MoveAccount](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/move-account.html)in der *AWS CLI Befehlsreferenz*. 

### `Konto aus der Organisation entfernen`
<a name="organizations_RemoveAccountFromOrganization_cli_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung. `remove-account-from-organization`

**AWS CLI**  
**So entfernen Sie ein Konto als Hauptkonto aus einer Organisation**  
Das folgende Beispiel zeigt, wie ein Mitgliedskonto aus einer Organisation entfernt wird.  

```
aws organizations remove-account-from-organization --account-id {{333333333333}}
```
+  Einzelheiten zur API finden Sie [RemoveAccountFromOrganization](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/remove-account-from-organization.html)in der *AWS CLI Befehlsreferenz*. 

### `Organisationseinheit aktualisieren`
<a name="organizations_UpdateOrganizationalUnit_cli_topic"></a>

Das folgende Codebeispiel zeigt, wie man es benutzt. `update-organizational-unit`

**AWS CLI**  
**Um eine Organisationseinheit umzubenennen**  
Dieses Beispiel zeigt, wie Sie eine Organisationseinheit umbenennen: In diesem Beispiel wird die Organisationseinheit in „AccountingOU“ umbenannt:  

```
aws organizations update-organizational-unit --organizational-unit-id {{ou-examplerootid111-exampleouid111}} --name {{AccountingOU}}
```
Die Ausgabe zeigt den neuen Namen:  

```
{
        "OrganizationalUnit": {
                "Id": "ou-examplerootid111-exampleouid111",
                "Name": "AccountingOU",
                "Arn": "arn:aws:organizations::111111111111:ou/o-exampleorgid/ou-examplerootid111-exampleouid111",
                "Path": "o-exampleorgid/r-examplerootid111/ou-examplerootid111-exampleouid111/"
        }
}
```
+  Einzelheiten zur API finden Sie [UpdateOrganizationalUnit](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/update-organizational-unit.html)in der *AWS CLI Befehlsreferenz*. 

### `Richtlinie aktualisieren`
<a name="organizations_UpdatePolicy_cli_topic"></a>

Das folgende Codebeispiel zeigt, wie man es benutzt. `update-policy`

**AWS CLI**  
**Beispiel 1: So benennen Sie eine Richtlinie um**  
Im folgenden Beispiel für `update-policy` wird eine Richtlinie umbenannt und eine neue Beschreibung gegeben.  

```
aws organizations update-policy \
    --policy-id {{p-examplepolicyid111}} \
    --name {{Renamed-Policy}} \
    --description {{"This description replaces the original."}}
```
In der Ausgabe werden der neue Name und die Beschreibung angezeigt.  

```
{
    "Policy": {
        "Content": "{\n  \"Version\":\"2012-10-17\",\n  \"Statement\":{\n    \"Effect\":\"Allow\",\n    \"Action\":\"ec2:*\",\n    \"Resource\":\"*\"\n  }\n}\n",
        "PolicySummary": {
            "Id": "p-examplepolicyid111",
            "AwsManaged": false,
            "Arn":"arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
            "Description": "This description replaces the original.",
            "Name": "Renamed-Policy",
            "Type": "SERVICE_CONTROL_POLICY"
        }
    }
}
```
**Beispiel 2: So ersetzen Sie den JSON-Textinhalt einer Richtlinie**  
Das folgende Beispiel zeigt, wie Sie den JSON-Text des SCP im vorherigen Beispiel durch eine neue JSON-Richtlinientextzeichenfolge ersetzen, die S3 anstelle von EC2 zulässt:  

```
aws organizations update-policy \
    --policy-id {{p-examplepolicyid111}} \
    --content "{\"Version\":\"2012-10-17\",\"Statement\":{\"Effect\":\"Allow\",\"Action\":\"s3:*\",\"Resource\":\"*\"}}"
```
Die Ausgabe zeigt den neuen Inhalt:  

```
{
    "Policy": {
        "Content": "{ \"Version\": \"2012-10-17\", \"Statement\": { \"Effect\": \"Allow\", \"Action\": \"s3:*\", \"Resource\": \"*\" } }",
        "PolicySummary": {
            "Arn": "arn:aws:organizations::111111111111:policy/o-exampleorgid/service_control_policy/p-examplepolicyid111",
            "AwsManaged": false;
            "Description": "This description replaces the original.",
            "Id": "p-examplepolicyid111",
            "Name": "Renamed-Policy",
            "Type": "SERVICE_CONTROL_POLICY"
        }
    }
}
```
+  Einzelheiten zur API finden Sie [UpdatePolicy](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/organizations/update-policy.html)in der *AWS CLI Befehlsreferenz*. 