pub struct PutProjectPolicy { /* private fields */ }Expand description
Fluent builder constructing a request to PutProjectPolicy.
Attaches a project policy to a Amazon Rekognition Custom Labels project in a trusting AWS account. A project policy specifies that a trusted AWS account can copy a model version from a trusting AWS account to a project in the trusted AWS account. To copy a model version you use the CopyProjectVersion operation.
For more information about the format of a project policy document, see Attaching a project policy (SDK) in the Amazon Rekognition Custom Labels Developer Guide.
The response from PutProjectPolicy is a revision ID for the project policy. You can attach multiple project policies to a project. You can also update an existing project policy by specifying the policy revision ID of the existing policy.
To remove a project policy from a project, call DeleteProjectPolicy. To get a list of project policies attached to a project, call ListProjectPolicies.
You copy a model version by calling CopyProjectVersion.
Implementations
sourceimpl PutProjectPolicy
impl PutProjectPolicy
sourcepub async fn customize(
self
) -> Result<CustomizableOperation<PutProjectPolicy, AwsResponseRetryClassifier>, SdkError<PutProjectPolicyError>>
pub async fn customize(
self
) -> Result<CustomizableOperation<PutProjectPolicy, AwsResponseRetryClassifier>, SdkError<PutProjectPolicyError>>
Consume this builder, creating a customizable operation that can be modified before being sent. The operation’s inner http::Request can be modified as well.
sourcepub async fn send(
self
) -> Result<PutProjectPolicyOutput, SdkError<PutProjectPolicyError>>
pub async fn send(
self
) -> Result<PutProjectPolicyOutput, SdkError<PutProjectPolicyError>>
Sends the request and returns the response.
If an error occurs, an SdkError will be returned with additional details that
can be matched against.
By default, any retryable failures will be retried twice. Retry behavior is configurable with the RetryConfig, which can be set when configuring the client.
sourcepub fn project_arn(self, input: impl Into<String>) -> Self
pub fn project_arn(self, input: impl Into<String>) -> Self
The Amazon Resource Name (ARN) of the project that the project policy is attached to.
sourcepub fn set_project_arn(self, input: Option<String>) -> Self
pub fn set_project_arn(self, input: Option<String>) -> Self
The Amazon Resource Name (ARN) of the project that the project policy is attached to.
sourcepub fn policy_name(self, input: impl Into<String>) -> Self
pub fn policy_name(self, input: impl Into<String>) -> Self
A name for the policy.
sourcepub fn set_policy_name(self, input: Option<String>) -> Self
pub fn set_policy_name(self, input: Option<String>) -> Self
A name for the policy.
sourcepub fn policy_revision_id(self, input: impl Into<String>) -> Self
pub fn policy_revision_id(self, input: impl Into<String>) -> Self
The revision ID for the Project Policy. Each time you modify a policy, Amazon Rekognition Custom Labels generates and assigns a new PolicyRevisionId and then deletes the previous version of the policy.
sourcepub fn set_policy_revision_id(self, input: Option<String>) -> Self
pub fn set_policy_revision_id(self, input: Option<String>) -> Self
The revision ID for the Project Policy. Each time you modify a policy, Amazon Rekognition Custom Labels generates and assigns a new PolicyRevisionId and then deletes the previous version of the policy.
sourcepub fn policy_document(self, input: impl Into<String>) -> Self
pub fn policy_document(self, input: impl Into<String>) -> Self
A resource policy to add to the model. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see IAM JSON policy reference.
sourcepub fn set_policy_document(self, input: Option<String>) -> Self
pub fn set_policy_document(self, input: Option<String>) -> Self
A resource policy to add to the model. The policy is a JSON structure that contains one or more statements that define the policy. The policy must follow the IAM syntax. For more information about the contents of a JSON policy document, see IAM JSON policy reference.
Trait Implementations
sourceimpl Clone for PutProjectPolicy
impl Clone for PutProjectPolicy
sourcefn clone(&self) -> PutProjectPolicy
fn clone(&self) -> PutProjectPolicy
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more