

Weitere AWS SDK-Beispiele sind im GitHub Repo [AWS Doc SDK Examples](https://github.com/awsdocs/aws-doc-sdk-examples) verfügbar.

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 Route 53 53-Profile mit AWS CLI
<a name="cli_2_route53profiles_code_examples"></a>

Die folgenden Codebeispiele zeigen Ihnen, wie Sie mithilfe von Route 53 53-Profilen Aktionen ausführen und allgemeine Szenarien implementieren. AWS Command Line Interface 

*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>

### `associate-profile`
<a name="route53profiles_AssociateProfile_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung von`associate-profile`.

**AWS CLI**  
**So ordnen Sie ein Profil zu**  
Im folgenden Beispiel für `associate-profile` wird ein Profil zu einer VPC zugeordnet.  

```
aws route53profiles associate-profile \
    --name test-association \
    --profile-id rp-4987774726example \
    --resource-id vpc-0af3b96b3example
```
Ausgabe:  

```
{
    "ProfileAssociation": {
        "CreationTime": 1710851336.527,
        "Id": "rpassoc-489ce212fexample",
        "ModificationTime": 1710851336.527,
        "Name": "test-association",
        "OwnerId": "123456789012",
        "ProfileId": "rp-4987774726example",
        "ResourceId": "vpc-0af3b96b3example",
        "Status": "CREATING",
        "StatusMessage": "Creating Profile Association"
    }
}
```
Weitere Informationen finden Sie unter [Verwenden von Profilen](https://docs.aws.amazon.com/Route53/latest/DeveloperGuide/profile-high-level-steps.html) im *Entwicklerhandbuch für Amazon Route 53*.  
+  Einzelheiten zur API finden Sie [AssociateProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/associate-profile.html)in der *AWS CLI Befehlsreferenz*. 

### `associate-resource-to-profile`
<a name="route53profiles_AssociateResourceToProfile_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`associate-resource-to-profile`.

**AWS CLI**  
**So ordnen Sie eine Ressource einem Profil zu**  
Im folgenden Beispiel für `associate-resource-to-profile` wird eine DNS-Firewall-Regelgruppe mit der Priorität 102 einem Profil zugeordnet.  

```
aws route53profiles associate-resource-to-profile \
    --name test-resource-association \
    --profile-id rp-4987774726example \
    --resource-arn arn:aws:route53resolver:us-east-1:123456789012:firewall-rule-group/rslvr-frg-cfe7f72example \
    --resource-properties "{\"priority\": 102}"
```
Ausgabe:  

```
{
    "ProfileResourceAssociation": {
        "CreationTime": 1710851216.613,
        "Id": "rpr-001913120a7example",
        "ModificationTime": 1710851216.613,
        "Name": "test-resource-association",
        "OwnerId": "123456789012",
        "ProfileId": "rp-4987774726example",
        "ResourceArn": "arn:aws:route53resolver:us-east-1:123456789012:firewall-rule-group/rslvr-frg-cfe7f72example",
        "ResourceProperties": "{\"priority\":102}",
        "ResourceType": "FIREWALL_RULE_GROUP",
        "Status": "UPDATING",
        "StatusMessage": "Updating the Profile to DNS Firewall rule group association"
    }
}
```
+  Einzelheiten zur API finden Sie [AssociateResourceToProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/associate-resource-to-profile.html)in der *AWS CLI Befehlsreferenz*. 

### `create-profile`
<a name="route53profiles_CreateProfile_cli_2_topic"></a>

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

**AWS CLI**  
**So erstellen Sie ein Profil**  
Im folgenden Beispiel für `create-profile` wird ein Profil erstellt.  

```
aws route53profiles create-profile \
    --name test
```
Ausgabe:  

```
{
    "Profile": {
        "Arn": "arn:aws:route53profiles:us-east-1:123456789012:profile/rp-6ffe47d5example",
        "ClientToken": "2ca1a304-32b3-4f5f-bc4c-EXAMPLE11111",
        "CreationTime": 1710850903.578,
        "Id": "rp-6ffe47d5example",
        "ModificationTime": 1710850903.578,
        "Name": "test",
        "OwnerId": "123456789012",
        "ShareStatus": "NOT_SHARED",
        "Status": "COMPLETE",
        "StatusMessage": "Created Profile"
    }
}
```
+  Einzelheiten zur API finden Sie [CreateProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/create-profile.html)in der *AWS CLI Befehlsreferenz*. 

### `delete-profile`
<a name="route53profiles_DeleteProfile_cli_2_topic"></a>

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

**AWS CLI**  
**So löschen Sie ein Profil**  
Im folgenden Beispiel für `delete-profile` wird ein Profil gelöscht.  

```
aws route53profiles delete-profile \
    --profile-id rp-6ffe47d5example
```
Ausgabe:  

```
{
    "Profile": {
        "Arn": "arn:aws:route53profiles:us-east-1:123456789012:profile/rp-6ffe47d5example",
        "ClientToken": "0a15fec0-05d9-4f78-bec0-EXAMPLE11111",
        "CreationTime": 1710850903.578,
        "Id": "rp-6ffe47d5example",
        "ModificationTime": 1710850903.578,
        "Name": "test",
        "OwnerId": "123456789012",
        "ShareStatus": "NOT_SHARED",
        "Status": "DELETED",
        "StatusMessage": "Deleted Profile"
    }
}
```
+  Einzelheiten zur API finden Sie [DeleteProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/delete-profile.html)in der *AWS CLI Befehlsreferenz*. 

### `disassociate-profile`
<a name="route53profiles_DisassociateProfile_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`disassociate-profile`.

**AWS CLI**  
**So heben Sie die Zuordnung eines Profils auf**  
Im folgenden Beispiel für `disassociate-profile` wird die Zuordnung eines Profils zu einer VPC aufgehoben.  

```
aws route53profiles disassociate-profile \
    --profile-id rp-4987774726example \
    --resource-id vpc-0af3b96b3example
```
Ausgabe:  

```
{
    "ProfileAssociation": {
        "CreationTime": 1710851336.527,
        "Id": "rpassoc-489ce212fexample",
        "ModificationTime": 1710851401.362,
        "Name": "test-association",
        "OwnerId": "123456789012",
        "ProfileId": "rp-4987774726example",
        "ResourceId": "vpc-0af3b96b3example",
        "Status": "DELETING",
        "StatusMessage": "Deleting Profile Association"
    }
}
```
+  Einzelheiten zur API finden Sie [DisassociateProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/disassociate-profile.html)in der *AWS CLI Befehlsreferenz*. 

### `disassociate-resource-from-profile`
<a name="route53profiles_DisassociateResourceFromProfile_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`disassociate-resource-from-profile`.

**AWS CLI**  
**So heben Sie die Zuordnung einer Ressource zu einem Profil auf**  
Im folgenden Beispiel für `disassociate-resource-from-profile` wird die Zuordnung einer DNS-Firewall-Regelgruppe zu einem Profil aufgehoben.  

```
aws route53profiles disassociate-resource-from-profile \
    --profile-id rp-4987774726example \
    --resource-arn arn:aws:route53resolver:us-east-1:123456789012:firewall-rule-group/rslvr-frg-cfe7f72example
```
Ausgabe:  

```
{
    "ProfileResourceAssociation": {
        "CreationTime": 1710851216.613,
        "Id": "rpr-001913120a7example",
        "ModificationTime": 1710852624.36,
        "Name": "test-resource-association",
        "OwnerId": "123456789012",
        "ProfileId": "rp-4987774726example",
        "ResourceArn": "arn:aws:route53resolver:us-east-1:123456789012:firewall-rule-group/rslvr-frg-cfe7f72example",
        "ResourceProperties": "{\"priority\":105}",
        "ResourceType": "FIREWALL_RULE_GROUP",
        "Status": "DELETING",
        "StatusMessage": "Deleting the Profile to DNS Firewall rule group association"
    }
}
```
+  Einzelheiten zur API finden Sie [DisassociateResourceFromProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/disassociate-resource-from-profile.html)in der *AWS CLI Befehlsreferenz*. 

### `get-profile-association`
<a name="route53profiles_GetProfileAssociation_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`get-profile-association`.

**AWS CLI**  
**So rufen Sie Informationen über eine Profilzuordnung ab**  
Im folgenden Beispiel für `get-profile-association` werden Informationen über die angegebene Profilzuordnung abgerufen.  

```
aws route53profiles get-profile-association \
    --profile-association-id rpassoc-489ce212fexample
```
Ausgabe:  

```
{
    "ProfileAssociation": {
        "CreationTime": 1709338817.148,
        "Id": "rrpassoc-489ce212fexample",
        "ModificationTime": 1709338974.772,
        "Name": "test-association",
        "OwnerId": "123456789012",
        "ProfileId": "rp-4987774726example",
        "ResourceId": "vpc-0af3b96b3example",
        "Status": "COMPLETE",
        "StatusMessage": "Created Profile Association"
    }
}
```
+  Einzelheiten zur API finden Sie [GetProfileAssociation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/get-profile-association.html)in der *AWS CLI Befehlsreferenz*. 

### `get-profile-resource-association`
<a name="route53profiles_GetProfileResourceAssociation_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`get-profile-resource-association`.

**AWS CLI**  
**So rufen Sie Informationen über die Zuordnung einer Ressource zu einem Profil ab**  
Im folgenden `get-profile-resource-association` werden Informationen über die angegebene Ressourcenzuordnung zu einem Profil zurückgegeben.  

```
aws route53profiles get-profile-resource-association \
    --profile-resource-association-id rpr-001913120a7example
```
Ausgabe:  

```
{
    "ProfileResourceAssociation": {
        "CreationTime": 1710851216.613,
        "Id": "rpr-001913120a7example",
        "ModificationTime": 1710852303.798,
        "Name": "test-resource-association",
        "OwnerId": "123456789012",
        "ProfileId": "rp-4987774726example",
        "ResourceArn": "arn:aws:route53resolver:us-east-1:123456789012:firewall-rule-group/rslvr-frg-cfe7f72example",
        "ResourceProperties": "{\"priority\":105}",
        "ResourceType": "FIREWALL_RULE_GROUP",
        "Status": "COMPLETE",
        "StatusMessage": "Completed creation of Profile to DNS Firewall rule group association"
    }
}
```
+  Einzelheiten zur API finden Sie [GetProfileResourceAssociation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/get-profile-resource-association.html)in der *AWS CLI Befehlsreferenz*. 

### `get-profile`
<a name="route53profiles_GetProfile_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`get-profile`.

**AWS CLI**  
**So rufen Sie Informationen zu einem Profil ab**  
Im folgenden `get-profile` werden Informationen über das angegebene Profil zurückgegeben.  

```
aws route53profiles get-profile \
    --profile-id rp-4987774726example
```
Ausgabe:  

```
{
    "Profile": {
        "Arn": "arn:aws:route53profiles:us-east-1:123456789012:profile/rp-4987774726example",
        "ClientToken": "0cbc5ae7-4921-4204-bea9-EXAMPLE11111",
        "CreationTime": 1710851044.288,
        "Id": "rp-4987774726example",
        "ModificationTime": 1710851044.288,
        "Name": "test",
        "OwnerId": "123456789012",
        "ShareStatus": "NOT_SHARED",
        "Status": "COMPLETE",
        "StatusMessage": "Created Profile"
    }
}
```
+  Einzelheiten zur API finden Sie [GetProfile](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/get-profile.html)in der *AWS CLI Befehlsreferenz*. 

### `list-profile-associations`
<a name="route53profiles_ListProfileAssociations_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-profile-associations`.

**AWS CLI**  
**So listen Sie Profilzuordnungen auf**  
Im Folgenden `list-profile-associations` werden die Profilverknüpfungen in Ihrem AWS Konto aufgeführt.  

```
aws route53profiles list-profile-associations
```
Ausgabe:  

```
{
    "ProfileAssociations": [
        {
            "CreationTime": 1709338817.148,
            "Id": "rpassoc-489ce212fexample",
            "ModificationTime": 1709338974.772,
            "Name": "test-association",
            "OwnerId": "123456789012",
            "ProfileId": "rp-4987774726example",
            "ResourceId": "vpc-0af3b96b3example",
            "Status": "COMPLETE",
            "StatusMessage": "Created Profile Association"
        }
    ]
}
```
+  Einzelheiten zur API finden Sie [ListProfileAssociations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/list-profile-associations.html)in der *AWS CLI Befehlsreferenz*. 

### `list-profile-resource-associations`
<a name="route53profiles_ListProfileResourceAssociations_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-profile-resource-associations`.

**AWS CLI**  
**So listen Sie Profilressourcenzuordnungen auf**  
Im folgenden `list-profile-resource-associations` werden die Profilressourcenzuordnungen für das angegebene Profil aufgelistet.  

```
aws route53profiles list-profile-resource-associations \
    --profile-id rp-4987774726example
```
Ausgabe:  

```
{
     "ProfileResourceAssociations": [
         {
             "CreationTime": 1710851216.613,
             "Id": "rpr-001913120a7example",
             "ModificationTime": 1710851216.613,
             "Name": "test-resource-association",
             "OwnerId": "123456789012",
             "ProfileId": "rp-4987774726example",
             "ResourceArn": "arn:aws:route53resolver:us-east-1:123456789012:firewall-rule-group/rslvr-frg-cfe7f72example",
             "ResourceProperties": "{\"priority\":102}",
             "ResourceType": "FIREWALL_RULE_GROUP",
             "Status": "COMPLETE",
             "StatusMessage": "Completed creation of Profile to DNS Firewall rule group association"
         }
     ]
 }
```
+  Einzelheiten zur API finden Sie [ListProfileResourceAssociations](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/list-profile-resource-associations.html)in der *AWS CLI Befehlsreferenz*. 

### `list-profiles`
<a name="route53profiles_ListProfiles_cli_2_topic"></a>

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

**AWS CLI**  
**So listen Sie Profile auf**  
Im Folgenden `list-profiles` werden die Profile in Ihrem AWS Konto aufgeführt und zusätzliche Informationen zu ihnen angezeigt.  

```
aws route53profiles list-profiles
```
Ausgabe:  

```
{
     "ProfileSummaries": [
         {
             "Arn": "arn:aws:route53profiles:us-east-1:123456789012:profile/rp-4987774726example",
             "Id": "rp-4987774726example",
             "Name": "test",
             "ShareStatus": "NOT_SHARED"
         }
     ]
 }
```
+  Einzelheiten zur API finden Sie [ListProfiles](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/list-profiles.html)in der *AWS CLI Befehlsreferenz*. 

### `list-tags-for-resource`
<a name="route53profiles_ListTagsForResource_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`list-tags-for-resource`.

**AWS CLI**  
**So listen Sie Tags für eine Ressource auf**  
Im folgenden `list-tags-for-resource` werden die Tags für die angegebene Ressource aufgelistet.  

```
aws route53profiles list-tags-for-resource \
    --resource-arn arn:aws:route53profiles:us-east-1:123456789012:profile/rp-4987774726example
```
Ausgabe:  

```
{
    "Tags": {
        "my-key-2": "my-value-2",
        "my-key-1": "my-value-1"
    }
}
```
+  Einzelheiten zur API finden Sie [ListTagsForResource](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/list-tags-for-resource.html)in der *AWS CLI Befehlsreferenz*. 

### `update-profile-resource-association`
<a name="route53profiles_UpdateProfileResourceAssociation_cli_2_topic"></a>

Das folgende Codebeispiel zeigt die Verwendung`update-profile-resource-association`.

**AWS CLI**  
**So aktualisieren Sie eine einem Profil zugeordnete Ressource**  
Im folgenden `update-profile-resource-association` wird eine dem Profil zugeordnete Priorität einer DNS-Firewall-Regelgruppe aktualisiert.  

```
aws route53profiles update-profile-resource-association \
    --profile-resource-association-id rpr-001913120a7example \
    --resource-properties "{\"priority\": 105}"
```
Ausgabe:  

```
{
    "ProfileResourceAssociation": {
        "CreationTime": 1710851216.613,
        "Id": "rpr-001913120a7example",
        "ModificationTime": 1710852303.798,
        "Name": "test-resource-association",
        "OwnerId": "123456789012",
        "ProfileId": "rp-4987774726example",
        "ResourceArn": "arn:aws:route53resolver:us-east-1:123456789012:firewall-rule-group/rslvr-frg-cfe7f72example",
        "ResourceProperties": "{\"priority\":105}",
        "ResourceType": "FIREWALL_RULE_GROUP",
        "Status": "UPDATING",
        "StatusMessage": "Updating the Profile to DNS Firewall rule group association"
    }
}
```
+  Einzelheiten zur API finden Sie [UpdateProfileResourceAssociation](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/route53profiles/update-profile-resource-association.html)in der *AWS CLI Befehlsreferenz*. 