

Pemberitahuan akhir dukungan: Pada 7 Oktober 2026, AWS akan mengakhiri dukungan untuk AWS Proton. Setelah 7 Oktober 2026, Anda tidak akan lagi dapat mengakses AWS Proton konsol atau AWS Proton sumber daya. Infrastruktur yang Anda gunakan akan tetap utuh. Untuk informasi selengkapnya, lihat Panduan [AWS Proton Pengakhiran Layanan dan Migrasi](https://docs.aws.amazon.com/proton/latest/userguide/proton-end-of-support.html).

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

# Contoh kebijakan berbasis kondisi-kunci untuk AWS Proton
<a name="security_iam_condition-key-based-policy-examples"></a>

Contoh berikut kebijakan IAM menolak akses ke AWS Proton tindakan yang cocok dengan templat yang ditentukan dalam blok. `Condition` Perhatikan bahwa kunci kondisi ini hanya didukung oleh tindakan yang tercantum di [Tindakan, sumber daya, dan kunci kondisi untuk AWS Proton](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsproton.html). Untuk mengelola izin pada tindakan lain, seperti`DeleteEnvironmentTemplate`, Anda harus menggunakan kontrol akses tingkat sumber daya.

**Contoh kebijakan yang menolak tindakan AWS Proton template pada template tertentu:**

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Deny",
            "Action": ["proton:*"],
            "Resource": "*",
            "Condition": {
                "StringEqualsIfExists": {
                    "proton:EnvironmentTemplate": ["arn:aws:proton:region_id:123456789012:environment-template/my-environment-template"]
                }
            }
        },
        {
            "Effect": "Deny",
            "Action": ["proton:*"],
            "Resource": "*",
            "Condition": {
                "StringEqualsIfExists": {
                    "proton:ServiceTemplate": ["arn:aws:proton:region_id:123456789012:service-template/my-service-template"]
                }
            }
        }
    ]
}
```

------

Dalam kebijakan contoh berikutnya, pernyataan tingkat Sumber Daya pertama menolak akses ke tindakan AWS Proton templat`ListServiceTemplates`, selain yang cocok dengan templat layanan yang tercantum di blok. `Resource` Pernyataan kedua menolak akses ke AWS Proton tindakan yang cocok dengan templat yang tercantum di `Condition` blok.

**Contoh kebijakan yang menyangkal AWS Proton tindakan yang cocok dengan templat tertentu:**

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Deny",
            "Action": [
                "proton:*"
            ],
            "Resource": "arn:aws:proton:us-east-1:123456789012:service-template/my-service-template"
        },
        {
            "Effect": "Deny",
            "Action": [
                "proton:*"
            ],
            "Resource": "*",
            "Condition": {
                "StringEqualsIfExists": {
                    "proton:ServiceTemplate": [
                        "arn:aws:proton:us-east-1:123456789012:service-template/my-service-template"
                    ]
                }
            }
        }
    ]
}
```

------

Contoh kebijakan akhir memungkinkan AWS Proton tindakan developer yang cocok dengan templat layanan tertentu yang tercantum dalam `Condition` blok.

**Contoh kebijakan untuk mengizinkan tindakan AWS Proton pengembang yang cocok dengan templat tertentu:**

------
#### [ JSON ]

****  

```
{
    "Version":"2012-10-17",		 	 	 
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "proton:ListServiceTemplates",
                "proton:ListServiceTemplateVersions",
                "proton:ListServices",
                "proton:ListServiceInstances",
                "proton:ListEnvironments",
                "proton:GetServiceTemplate",
                "proton:GetServiceTemplateVersion",
                "proton:GetService",
                "proton:GetServiceInstance",
                "proton:GetEnvironment",
                "proton:CreateService",
                "proton:UpdateService",
                "proton:UpdateServiceInstance",
                "proton:UpdateServicePipeline",
                "proton:DeleteService",
                "codestar-connections:ListConnections"
            ],
            "Resource": "*",
            "Condition": {
                "StringEqualsIfExists": {
                    "proton:ServiceTemplate": "arn:aws:proton:region_id:123456789012:service-template/my-service-template"
                }
            }
        },
        {
            "Effect": "Allow",
            "Action": [
                "codestar-connections:PassConnection"
            ],
            "Resource": "arn:aws:codestar-connections:*:*:connection/*",
            "Condition": {
                "StringEquals": {
                    "codestar-connections:PassedToService": "proton.amazonaws.com"
                }
            }
        }

    ]
}
```

------