Struct aws_sdk_rekognition::operation::copy_project_version::builders::CopyProjectVersionFluentBuilder
source · pub struct CopyProjectVersionFluentBuilder { /* private fields */ }Expand description
Fluent builder constructing a request to CopyProjectVersion.
This operation applies only to Amazon Rekognition Custom Labels.
Copies a version of an Amazon Rekognition Custom Labels model from a source project to a destination project. The source and destination projects can be in different AWS accounts but must be in the same AWS Region. You can't copy a model to another AWS service.
To copy a model version to a different AWS account, you need to create a resource-based policy known as a project policy. You attach the project policy to the source project by calling PutProjectPolicy. The project policy gives permission to copy the model version from a trusting AWS account to a trusted account.
For more information creating and attaching a project policy, see Attaching a project policy (SDK) in the Amazon Rekognition Custom Labels Developer Guide.
If you are copying a model version to a project in the same AWS account, you don't need to create a project policy.
Copying project versions is supported only for Custom Labels models.
To copy a model, the destination project, source project, and source model version must already exist.
Copying a model version takes a while to complete. To get the current status, call DescribeProjectVersions and check the value of Status in the ProjectVersionDescription object. The copy operation has finished when the value of Status is COPYING_COMPLETED.
This operation requires permissions to perform the rekognition:CopyProjectVersion action.
Implementations§
source§impl CopyProjectVersionFluentBuilder
impl CopyProjectVersionFluentBuilder
sourcepub fn as_input(&self) -> &CopyProjectVersionInputBuilder
pub fn as_input(&self) -> &CopyProjectVersionInputBuilder
Access the CopyProjectVersion as a reference.
sourcepub async fn send(
self
) -> Result<CopyProjectVersionOutput, SdkError<CopyProjectVersionError, HttpResponse>>
pub async fn send( self ) -> Result<CopyProjectVersionOutput, SdkError<CopyProjectVersionError, HttpResponse>>
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 customize(
self
) -> CustomizableOperation<CopyProjectVersionOutput, CopyProjectVersionError, Self>
pub fn customize( self ) -> CustomizableOperation<CopyProjectVersionOutput, CopyProjectVersionError, Self>
Consumes this builder, creating a customizable operation that can be modified before being sent.
sourcepub fn source_project_arn(self, input: impl Into<String>) -> Self
pub fn source_project_arn(self, input: impl Into<String>) -> Self
The ARN of the source project in the trusting AWS account.
sourcepub fn set_source_project_arn(self, input: Option<String>) -> Self
pub fn set_source_project_arn(self, input: Option<String>) -> Self
The ARN of the source project in the trusting AWS account.
sourcepub fn get_source_project_arn(&self) -> &Option<String>
pub fn get_source_project_arn(&self) -> &Option<String>
The ARN of the source project in the trusting AWS account.
sourcepub fn source_project_version_arn(self, input: impl Into<String>) -> Self
pub fn source_project_version_arn(self, input: impl Into<String>) -> Self
The ARN of the model version in the source project that you want to copy to a destination project.
sourcepub fn set_source_project_version_arn(self, input: Option<String>) -> Self
pub fn set_source_project_version_arn(self, input: Option<String>) -> Self
The ARN of the model version in the source project that you want to copy to a destination project.
sourcepub fn get_source_project_version_arn(&self) -> &Option<String>
pub fn get_source_project_version_arn(&self) -> &Option<String>
The ARN of the model version in the source project that you want to copy to a destination project.
sourcepub fn destination_project_arn(self, input: impl Into<String>) -> Self
pub fn destination_project_arn(self, input: impl Into<String>) -> Self
The ARN of the project in the trusted AWS account that you want to copy the model version to.
sourcepub fn set_destination_project_arn(self, input: Option<String>) -> Self
pub fn set_destination_project_arn(self, input: Option<String>) -> Self
The ARN of the project in the trusted AWS account that you want to copy the model version to.
sourcepub fn get_destination_project_arn(&self) -> &Option<String>
pub fn get_destination_project_arn(&self) -> &Option<String>
The ARN of the project in the trusted AWS account that you want to copy the model version to.
sourcepub fn version_name(self, input: impl Into<String>) -> Self
pub fn version_name(self, input: impl Into<String>) -> Self
A name for the version of the model that's copied to the destination project.
sourcepub fn set_version_name(self, input: Option<String>) -> Self
pub fn set_version_name(self, input: Option<String>) -> Self
A name for the version of the model that's copied to the destination project.
sourcepub fn get_version_name(&self) -> &Option<String>
pub fn get_version_name(&self) -> &Option<String>
A name for the version of the model that's copied to the destination project.
sourcepub fn output_config(self, input: OutputConfig) -> Self
pub fn output_config(self, input: OutputConfig) -> Self
The S3 bucket and folder location where the training output for the source model version is placed.
sourcepub fn set_output_config(self, input: Option<OutputConfig>) -> Self
pub fn set_output_config(self, input: Option<OutputConfig>) -> Self
The S3 bucket and folder location where the training output for the source model version is placed.
sourcepub fn get_output_config(&self) -> &Option<OutputConfig>
pub fn get_output_config(&self) -> &Option<OutputConfig>
The S3 bucket and folder location where the training output for the source model version is placed.
Adds a key-value pair to Tags.
To override the contents of this collection use set_tags.
The key-value tags to assign to the model version.
The key-value tags to assign to the model version.
The key-value tags to assign to the model version.
sourcepub fn kms_key_id(self, input: impl Into<String>) -> Self
pub fn kms_key_id(self, input: impl Into<String>) -> Self
The identifier for your AWS Key Management Service key (AWS KMS key). You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key, an alias for your KMS key, or an alias ARN. The key is used to encrypt training results and manifest files written to the output Amazon S3 bucket (OutputConfig).
If you choose to use your own KMS key, you need the following permissions on the KMS key.
-
kms:CreateGrant
-
kms:DescribeKey
-
kms:GenerateDataKey
-
kms:Decrypt
If you don't specify a value for KmsKeyId, images copied into the service are encrypted using a key that AWS owns and manages.
sourcepub fn set_kms_key_id(self, input: Option<String>) -> Self
pub fn set_kms_key_id(self, input: Option<String>) -> Self
The identifier for your AWS Key Management Service key (AWS KMS key). You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key, an alias for your KMS key, or an alias ARN. The key is used to encrypt training results and manifest files written to the output Amazon S3 bucket (OutputConfig).
If you choose to use your own KMS key, you need the following permissions on the KMS key.
-
kms:CreateGrant
-
kms:DescribeKey
-
kms:GenerateDataKey
-
kms:Decrypt
If you don't specify a value for KmsKeyId, images copied into the service are encrypted using a key that AWS owns and manages.
sourcepub fn get_kms_key_id(&self) -> &Option<String>
pub fn get_kms_key_id(&self) -> &Option<String>
The identifier for your AWS Key Management Service key (AWS KMS key). You can supply the Amazon Resource Name (ARN) of your KMS key, the ID of your KMS key, an alias for your KMS key, or an alias ARN. The key is used to encrypt training results and manifest files written to the output Amazon S3 bucket (OutputConfig).
If you choose to use your own KMS key, you need the following permissions on the KMS key.
-
kms:CreateGrant
-
kms:DescribeKey
-
kms:GenerateDataKey
-
kms:Decrypt
If you don't specify a value for KmsKeyId, images copied into the service are encrypted using a key that AWS owns and manages.
Trait Implementations§
source§impl Clone for CopyProjectVersionFluentBuilder
impl Clone for CopyProjectVersionFluentBuilder
source§fn clone(&self) -> CopyProjectVersionFluentBuilder
fn clone(&self) -> CopyProjectVersionFluentBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more