/*
* 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 ram-2018-01-04.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.RAM.Model
{
///
/// Container for the parameters to the CreateResourceShare operation.
/// Creates a resource share. You can provide a list of the Amazon
/// Resource Names (ARNs) for the resources that you want to share, a list of principals
/// you want to share the resources with, and the permissions to grant those principals.
///
///
///
/// Sharing a resource makes it available for use by principals outside of the Amazon
/// Web Services account that created the resource. Sharing doesn't change any permissions
/// or quotas that apply to the resource in the account that created it.
///
///
///
public partial class CreateResourceShareRequest : AmazonRAMRequest
{
private bool? _allowExternalPrincipals;
private string _clientToken;
private string _name;
private List _permissionArns = new List();
private List _principals = new List();
private List _resourceArns = new List();
private List _sources = new List();
private List _tags = new List();
///
/// Gets and sets the property AllowExternalPrincipals.
///
/// Specifies whether principals outside your organization in Organizations can be associated
/// with a resource share. A value of true
lets you share with individual
/// Amazon Web Services accounts that are not in your organization. A value of
/// false
only has meaning if your account is a member of an Amazon Web Services
/// Organization. The default value is true
.
///
///
public bool AllowExternalPrincipals
{
get { return this._allowExternalPrincipals.GetValueOrDefault(); }
set { this._allowExternalPrincipals = value; }
}
// Check to see if AllowExternalPrincipals property is set
internal bool IsSetAllowExternalPrincipals()
{
return this._allowExternalPrincipals.HasValue;
}
///
/// Gets and sets the property ClientToken.
///
/// Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency
/// of the request. This lets you safely retry the request without accidentally performing
/// the same operation a second time. Passing the same value to a later call to an operation
/// requires that you also pass the same value for all other parameters. We recommend
/// that you use a UUID
/// type of value..
///
///
///
/// If you don't provide this value, then Amazon Web Services generates a random one for
/// you.
///
///
///
/// If you retry the operation with the same ClientToken
, but with different
/// parameters, the retry fails with an IdempotentParameterMismatch
error.
///
///
public string ClientToken
{
get { return this._clientToken; }
set { this._clientToken = value; }
}
// Check to see if ClientToken property is set
internal bool IsSetClientToken()
{
return this._clientToken != null;
}
///
/// Gets and sets the property Name.
///
/// Specifies the name of the resource share.
///
///
[AWSProperty(Required=true)]
public string Name
{
get { return this._name; }
set { this._name = value; }
}
// Check to see if Name property is set
internal bool IsSetName()
{
return this._name != null;
}
///
/// Gets and sets the property PermissionArns.
///
/// Specifies the Amazon
/// Resource Names (ARNs) of the RAM permission to associate with the resource share.
/// If you do not specify an ARN for the permission, RAM automatically attaches the default
/// version of the permission for each resource type. You can associate only one permission
/// with each resource type included in the resource share.
///
///
public List PermissionArns
{
get { return this._permissionArns; }
set { this._permissionArns = value; }
}
// Check to see if PermissionArns property is set
internal bool IsSetPermissionArns()
{
return this._permissionArns != null && this._permissionArns.Count > 0;
}
///
/// Gets and sets the property Principals.
///
/// Specifies a list of one or more principals to associate with the resource share.
///
///
///
/// You can include the following values:
///
/// -
///
/// An Amazon Web Services account ID, for example:
123456789012
///
/// -
///
/// An Amazon
/// Resource Name (ARN) of an organization in Organizations, for example:
organizations::123456789012:organization/o-exampleorgid
///
///
/// -
///
/// An ARN of an organizational unit (OU) in Organizations, for example:
organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123
///
///
/// -
///
/// An ARN of an IAM role, for example:
iam::123456789012:role/rolename
///
/// -
///
/// An ARN of an IAM user, for example:
iam::123456789012user/username
///
///
///
/// Not all resource types can be shared with IAM roles and users. For more information,
/// see Sharing
/// with IAM roles and users in the Resource Access Manager User Guide.
///
///
///
public List Principals
{
get { return this._principals; }
set { this._principals = value; }
}
// Check to see if Principals property is set
internal bool IsSetPrincipals()
{
return this._principals != null && this._principals.Count > 0;
}
///
/// Gets and sets the property ResourceArns.
///
/// Specifies a list of one or more ARNs of the resources to associate with the resource
/// share.
///
///
public List ResourceArns
{
get { return this._resourceArns; }
set { this._resourceArns = value; }
}
// Check to see if ResourceArns property is set
internal bool IsSetResourceArns()
{
return this._resourceArns != null && this._resourceArns.Count > 0;
}
///
/// Gets and sets the property Sources.
///
/// Specifies from which source accounts the service principal has access to the resources
/// in this resource share.
///
///
public List Sources
{
get { return this._sources; }
set { this._sources = value; }
}
// Check to see if Sources property is set
internal bool IsSetSources()
{
return this._sources != null && this._sources.Count > 0;
}
///
/// Gets and sets the property Tags.
///
/// Specifies one or more tags to attach to the resource share itself. It doesn't attach
/// the tags to the resources associated with the resource share.
///
///
public List 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;
}
}
}