/* * 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 AssociateResourceShare operation. /// Adds the specified list of principals and list of resources to a resource share. Principals /// that already have access to this resource share immediately receive access to the /// added resources. Newly added principals immediately receive access to the resources /// shared in this resource share. /// public partial class AssociateResourceShareRequest : AmazonRAMRequest { private string _clientToken; private List _principals = new List(); private List _resourceArns = new List(); private string _resourceShareArn; private List _sources = new List(); /// /// 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 Principals. /// /// Specifies a list of principals to whom you want to the resource share. This can be /// null if you want to add only resources. /// /// /// /// What the principals can do with the resources in the share is determined by the RAM /// permissions that you associate with the resource share. See AssociateResourceSharePermission. /// /// /// /// 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 Amazon /// Resource Names (ARNs) of the resources that you want to share. This can be null /// if you want to add only principals. /// /// 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 ResourceShareArn. /// /// Specifies the Amazon /// Resource Name (ARN) of the resource share that you want to add principals or resources /// to. /// /// [AWSProperty(Required=true)] public string ResourceShareArn { get { return this._resourceShareArn; } set { this._resourceShareArn = value; } } // Check to see if ResourceShareArn property is set internal bool IsSetResourceShareArn() { return this._resourceShareArn != null; } /// /// 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; } } }