Exemple de politiques IAM - AWS Artifact

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

Exemple de politiques IAM

Vous pouvez créer des politiques d'autorisation qui accordent des autorisations aux utilisateurs IAM. Vous pouvez accorder aux utilisateurs l'accès aux AWS Artifact rapports et la possibilité d'accepter et de télécharger des accords au nom d'un seul compte ou d'une organisation.

Les exemples de politiques suivants indiquent les autorisations que vous pouvez attribuer aux utilisateurs IAM en fonction du niveau d'accès dont ils ont besoin.

Exemples de politiques pour gérer les AWS rapports grâce à des autorisations détaillées
Astuce

Vous devriez envisager d'utiliser la stratégie AWSArtifactReportsReadOnlyAccess gérée au lieu de définir votre propre stratégie.

La politique suivante autorise le téléchargement de tous les AWS rapports par le biais d'autorisations détaillées.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:ListReports", "artifact:GetReportMetadata", "artifact:GetReport", "artifact:GetTermForReport" ], "Resource": "*" } ] }

La politique suivante autorise le téléchargement uniquement des rapports AWS SOC, PCI et ISO par le biais d'autorisations détaillées.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:ListReports", "artifact:GetReportMetadata", "artifact:GetReport", "artifact:GetTermForReport" ], "Resource": "*", "Condition": { "StringEquals": { "artifact:ReportSeries": [ "SOC", "PCI", "ISO" ], "artifact:ReportCategory": [ "Certifications And Attestations" ] } } } ] }
Exemples de politiques pour gérer les rapports tiers
Astuce

Vous devriez envisager d'utiliser la stratégie AWSArtifactReportsReadOnlyAccess gérée au lieu de définir votre propre stratégie.

Les rapports tiers sont désignés par la ressource IAM. report

La politique suivante autorise toutes les fonctionnalités des rapports tiers.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:ListReports", "artifact:GetReportMetadata", "artifact:GetReport", "artifact:GetTermForReport" ], "Resource": "*" } ] }

La politique suivante autorise le téléchargement de rapports tiers.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:GetReport", "artifact:GetTermForReport" ], "Resource": "*" } ] }

La politique suivante autorise la liste des rapports tiers.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:ListReport" ], "Resource": "*" } ] }

La politique suivante autorise l'accès aux détails d'un rapport tiers pour toutes les versions.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:GetReportMetadata" ], "Resource": [ "arn:aws:artifact:us-east-1::report/report-jRVRFP8HxUN5zpPh:*" ] } ] }

La politique suivante autorise l'accès aux détails d'un rapport tiers pour une version spécifique.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:GetReportMetadata" ], "Resource": [ "arn:aws:artifact:us-east-1::report/report-jRVRFP8HxUN5zpPh:1" ] } ] }
Exemples de politiques pour gérer les accords

La politique suivante autorise le téléchargement de tous les accords. Les utilisateurs IAM doivent également disposer de cette autorisation pour accepter des accords.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:DownloadAgreement" ], "Resource": [ "*" ] } ] }

La politique suivante autorise l'acceptation d'un accord.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:AcceptAgreement", "artifact:DownloadAgreement" ], "Resource": [ "*" ] } ] }

La politique suivante autorise la résiliation d'un accord.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:TerminateAgreement" ], "Resource": [ "*" ] } ] }

La politique suivante accorde des autorisations pour gérer les accords de compte unique.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:AcceptAgreement", "artifact:DownloadAgreement", "artifact:TerminateAgreement" ], "Resource": [ "arn:aws:artifact::*:customer-agreement/*", "arn:aws:artifact:::agreement/*" ] } ] }
Exemples de politiques à intégrer AWS Organizations

La politique suivante autorise la création du rôle IAM AWS Artifact utilisé pour s'intégrer à AWS Organizations. Le compte de gestion de votre organisation doit disposer de ces autorisations pour démarrer avec les accords organisationnels.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": "iam:ListRoles", "Resource": "arn:aws:iam::*:role/*" }, { "Effect": "Allow", "Action": "iam:CreateServiceLinkedRole", "Resource": "arn:aws:iam::*:role/aws-service-role/artifact.amazonaws.com/AWSServiceRoleForArtifact" } ] }

La politique suivante accorde l'autorisation d'accorder AWS Artifact les autorisations d'utilisation AWS Organizations. Le compte de gestion de votre organisation doit disposer de ces autorisations pour démarrer avec les accords organisationnels.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "organizations:EnableAWSServiceAccess", "organizations:DescribeOrganization", "organizations:ListAWSServiceAccessForOrganization" ], "Resource": "*" } ] }
Exemples de politiques pour gérer les accords relatifs au compte de gestion

La politique suivante accorde des autorisations pour gérer les accords pour le compte de gestion.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:AcceptAgreement", "artifact:DownloadAgreement", "artifact:TerminateAgreement" ], "Resource": [ "arn:aws:artifact::*:customer-agreement/*", "arn:aws:artifact:::agreement/*" ] }, { "Effect": "Allow", "Action": "iam:ListRoles", "Resource": "arn:aws:iam::*:role/*" }, { "Effect": "Allow", "Action": "iam:CreateServiceLinkedRole", "Resource": "arn:aws:iam::*:role/aws-service-role/artifact.amazonaws.com/AWSServiceRoleForArtifact" }, { "Effect": "Allow", "Action": [ "organizations:DescribeOrganization", "organizations:EnableAWSServiceAccess", "organizations:ListAccounts", "organizations:ListAWSServiceAccessForOrganization" ], "Resource": "*" } ] }
Exemples de politiques pour gérer les accords organisationnels

La politique suivante accorde des autorisations pour gérer les accords organisationnels. Un autre utilisateur disposant des autorisations requises doit configurer les accords organisationnels.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:AcceptAgreement", "artifact:DownloadAgreement", "artifact:TerminateAgreement" ], "Resource": [ "arn:aws:artifact::*:customer-agreement/*", "arn:aws:artifact:::agreement/*" ] }, { "Effect": "Allow", "Action": [ "organizations:DescribeOrganization" ], "Resource": "*" } ] }

La politique suivante accorde des autorisations pour consulter les accords organisationnels.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:DownloadAgreement" ], "Resource": [ "arn:aws:artifact::*:customer-agreement/*", "arn:aws:artifact:::agreement/*" ] }, { "Effect": "Allow", "Action": [ "organizations:DescribeOrganization" ], "Resource": "*" } ] }
Exemples de politiques pour gérer les notifications

La politique suivante accorde des autorisations complètes pour utiliser AWS Artifact les notifications.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:GetAccountSettings", "artifact:PutAccountSettings", "notifications:AssociateChannel", "notifications:CreateEventRule", "notifications:CreateNotificationConfiguration", "notifications:DeleteEventRule", "notifications:DeleteNotificationConfiguration", "notifications:DisassociateChannel", "notifications:GetEventRule", "notifications:GetNotificationConfiguration", "notifications:ListChannels", "notifications:ListEventRules", "notifications:ListNotificationConfigurations", "notifications:ListNotificationHubs", "notifications:ListTagsForResource", "notifications:TagResource", "notifications:UntagResource", "notifications:UpdateEventRule", "notifications:UpdateNotificationConfiguration", "notifications-contacts:CreateEmailContact", "notifications-contacts:DeleteEmailContact", "notifications-contacts:GetEmailContact", "notifications-contacts:ListEmailContacts", "notifications-contacts:SendActivationCode" ], "Resource": [ "*" ] } ] }

La politique suivante autorise la liste de toutes les configurations.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:GetAccountSettings", "notifications:ListChannels", "notifications:ListEventRules", "notifications:ListNotificationConfigurations", "notifications:ListNotificationHubs", "notifications-contacts:GetEmailContact" ], "Resource": [ "*" ] } ] }

La politique suivante autorise la création d'une configuration.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:GetAccountSettings", "artifact:PutAccountSettings", "notifications-contacts:CreateEmailContact", "notifications-contacts:SendActivationCode", "notifications:AssociateChannel", "notifications:CreateEventRule", "notifications:CreateNotificationConfiguration", "notifications:ListEventRules", "notifications:ListNotificationHubs", "notifications:TagResource", "notifications-contacts:ListEmailContacts" ], "Resource": [ "*" ] } ] }

La politique suivante autorise la modification d'une configuration.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "artifact:GetAccountSettings", "artifact:PutAccountSettings", "notifications:AssociateChannel", "notifications:DisassociateChannel", "notifications:GetNotificationConfiguration", "notifications:ListChannels", "notifications:ListEventRules", "notifications:ListTagsForResource", "notifications:TagResource", "notifications:UntagResource", "notifications:UpdateEventRule", "notifications:UpdateNotificationConfiguration", "notifications-contacts:GetEmailContact", "notifications-contacts:ListEmailContacts" ], "Resource": [ "*" ] } ] }

La politique suivante autorise la suppression d'une configuration.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "notifications:DeleteNotificationConfiguration", "notifications:ListEventRules" ], "Resource": [ "*" ] } ] }

La politique suivante autorise l'affichage des détails d'une configuration.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "notifications:GetNotificationConfiguration", "notifications:ListChannels", "notifications:ListEventRules", "notifications:ListTagsForResource", "notifications-contacts:GetEmailContact" ], "Resource": [ "*" ] } ] }

La politique suivante autorise l'enregistrement ou le désenregistrement des hubs de notification.

{ "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "notifications:DeregisterNotificationHub", "notifications:RegisterNotificationHub" ], "Resource": [ "*" ] } ] }