/*
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License").
* You may not use this file except in compliance with the License.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed
* on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
* express or implied. See the License for the specific language governing
* permissions and limitations under the License.
*/
/*
* Do not modify this file. This file is generated from the rekognition-2016-06-27.normal.json service model.
*/
using System;
using System.Collections.Generic;
using System.Xml.Serialization;
using System.Text;
using System.IO;
using System.Net;
using Amazon.Runtime;
using Amazon.Runtime.Internal;
namespace Amazon.Rekognition.Model
{
///
/// Container for the parameters to the CopyProjectVersion operation.
/// 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.
///
///
///
/// 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.
///
///
public partial class CopyProjectVersionRequest : AmazonRekognitionRequest
{
private string _destinationProjectArn;
private string _kmsKeyId;
private OutputConfig _outputConfig;
private string _sourceProjectArn;
private string _sourceProjectVersionArn;
private Dictionary _tags = new Dictionary();
private string _versionName;
///
/// Gets and sets the property DestinationProjectArn.
///
/// The ARN of the project in the trusted AWS account that you want to copy the model
/// version to.
///
///
[AWSProperty(Required=true, Min=20, Max=2048)]
public string DestinationProjectArn
{
get { return this._destinationProjectArn; }
set { this._destinationProjectArn = value; }
}
// Check to see if DestinationProjectArn property is set
internal bool IsSetDestinationProjectArn()
{
return this._destinationProjectArn != null;
}
///
/// Gets and sets the property KmsKeyId.
///
/// 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.
///
///
[AWSProperty(Min=1, Max=2048)]
public string KmsKeyId
{
get { return this._kmsKeyId; }
set { this._kmsKeyId = value; }
}
// Check to see if KmsKeyId property is set
internal bool IsSetKmsKeyId()
{
return this._kmsKeyId != null;
}
///
/// Gets and sets the property OutputConfig.
///
/// The S3 bucket and folder location where the training output for the source model version
/// is placed.
///
///
[AWSProperty(Required=true)]
public OutputConfig OutputConfig
{
get { return this._outputConfig; }
set { this._outputConfig = value; }
}
// Check to see if OutputConfig property is set
internal bool IsSetOutputConfig()
{
return this._outputConfig != null;
}
///
/// Gets and sets the property SourceProjectArn.
///
/// The ARN of the source project in the trusting AWS account.
///
///
[AWSProperty(Required=true, Min=20, Max=2048)]
public string SourceProjectArn
{
get { return this._sourceProjectArn; }
set { this._sourceProjectArn = value; }
}
// Check to see if SourceProjectArn property is set
internal bool IsSetSourceProjectArn()
{
return this._sourceProjectArn != null;
}
///
/// Gets and sets the property SourceProjectVersionArn.
///
/// The ARN of the model version in the source project that you want to copy to a destination
/// project.
///
///
[AWSProperty(Required=true, Min=20, Max=2048)]
public string SourceProjectVersionArn
{
get { return this._sourceProjectVersionArn; }
set { this._sourceProjectVersionArn = value; }
}
// Check to see if SourceProjectVersionArn property is set
internal bool IsSetSourceProjectVersionArn()
{
return this._sourceProjectVersionArn != null;
}
///
/// Gets and sets the property Tags.
///
/// The key-value tags to assign to the model version.
///
///
[AWSProperty(Min=0, Max=200)]
public Dictionary Tags
{
get { return this._tags; }
set { this._tags = value; }
}
// Check to see if Tags property is set
internal bool IsSetTags()
{
return this._tags != null && this._tags.Count > 0;
}
///
/// Gets and sets the property VersionName.
///
/// A name for the version of the model that's copied to the destination project.
///
///
[AWSProperty(Required=true, Min=1, Max=255)]
public string VersionName
{
get { return this._versionName; }
set { this._versionName = value; }
}
// Check to see if VersionName property is set
internal bool IsSetVersionName()
{
return this._versionName != null;
}
}
}