All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.ram.model.DisassociateResourceShareRequest Maven / Gradle / Ivy

/*
 * Copyright 2017-2022 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.
 */
package com.amazonaws.services.ram.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

/**
 * 
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DisassociateResourceShareRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    /**
     * 

* Specifies Amazon Resoure * Name (ARN) of the resource share that you want to remove resources from. *

*/ private String resourceShareArn; /** *

* Specifies a list of Amazon * Resource Names (ARNs) for one or more resources that you want to remove from the resource share. After the * operation runs, these resources are no longer shared with principals outside of the Amazon Web Services account * that created the resources. *

*/ private java.util.List resourceArns; /** *

* Specifies a list of one or more principals that no longer are to have access to the resources in this resource * share. *

*

* You can include the following values: *

*
    *
  • *

    * An Amazon Web Services account ID, for example: 123456789012 *

    *
  • *
  • *

    * An Amazon Resoure 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. *

*
*/ private java.util.List principals; /** *

* 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. *

*/ private String clientToken; /** *

* Specifies Amazon Resoure * Name (ARN) of the resource share that you want to remove resources from. *

* * @param resourceShareArn * Specifies Amazon * Resoure Name (ARN) of the resource share that you want to remove resources from. */ public void setResourceShareArn(String resourceShareArn) { this.resourceShareArn = resourceShareArn; } /** *

* Specifies Amazon Resoure * Name (ARN) of the resource share that you want to remove resources from. *

* * @return Specifies Amazon * Resoure Name (ARN) of the resource share that you want to remove resources from. */ public String getResourceShareArn() { return this.resourceShareArn; } /** *

* Specifies Amazon Resoure * Name (ARN) of the resource share that you want to remove resources from. *

* * @param resourceShareArn * Specifies Amazon * Resoure Name (ARN) of the resource share that you want to remove resources from. * @return Returns a reference to this object so that method calls can be chained together. */ public DisassociateResourceShareRequest withResourceShareArn(String resourceShareArn) { setResourceShareArn(resourceShareArn); return this; } /** *

* Specifies a list of Amazon * Resource Names (ARNs) for one or more resources that you want to remove from the resource share. After the * operation runs, these resources are no longer shared with principals outside of the Amazon Web Services account * that created the resources. *

* * @return Specifies a list of Amazon Resource Names * (ARNs) for one or more resources that you want to remove from the resource share. After the operation * runs, these resources are no longer shared with principals outside of the Amazon Web Services account * that created the resources. */ public java.util.List getResourceArns() { return resourceArns; } /** *

* Specifies a list of Amazon * Resource Names (ARNs) for one or more resources that you want to remove from the resource share. After the * operation runs, these resources are no longer shared with principals outside of the Amazon Web Services account * that created the resources. *

* * @param resourceArns * Specifies a list of Amazon Resource Names * (ARNs) for one or more resources that you want to remove from the resource share. After the operation * runs, these resources are no longer shared with principals outside of the Amazon Web Services account that * created the resources. */ public void setResourceArns(java.util.Collection resourceArns) { if (resourceArns == null) { this.resourceArns = null; return; } this.resourceArns = new java.util.ArrayList(resourceArns); } /** *

* Specifies a list of Amazon * Resource Names (ARNs) for one or more resources that you want to remove from the resource share. After the * operation runs, these resources are no longer shared with principals outside of the Amazon Web Services account * that created the resources. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setResourceArns(java.util.Collection)} or {@link #withResourceArns(java.util.Collection)} if you want to * override the existing values. *

* * @param resourceArns * Specifies a list of Amazon Resource Names * (ARNs) for one or more resources that you want to remove from the resource share. After the operation * runs, these resources are no longer shared with principals outside of the Amazon Web Services account that * created the resources. * @return Returns a reference to this object so that method calls can be chained together. */ public DisassociateResourceShareRequest withResourceArns(String... resourceArns) { if (this.resourceArns == null) { setResourceArns(new java.util.ArrayList(resourceArns.length)); } for (String ele : resourceArns) { this.resourceArns.add(ele); } return this; } /** *

* Specifies a list of Amazon * Resource Names (ARNs) for one or more resources that you want to remove from the resource share. After the * operation runs, these resources are no longer shared with principals outside of the Amazon Web Services account * that created the resources. *

* * @param resourceArns * Specifies a list of Amazon Resource Names * (ARNs) for one or more resources that you want to remove from the resource share. After the operation * runs, these resources are no longer shared with principals outside of the Amazon Web Services account that * created the resources. * @return Returns a reference to this object so that method calls can be chained together. */ public DisassociateResourceShareRequest withResourceArns(java.util.Collection resourceArns) { setResourceArns(resourceArns); return this; } /** *

* Specifies a list of one or more principals that no longer are to have access to the resources in this resource * share. *

*

* You can include the following values: *

*
    *
  • *

    * An Amazon Web Services account ID, for example: 123456789012 *

    *
  • *
  • *

    * An Amazon Resoure 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. *

*
* * @return Specifies a list of one or more principals that no longer are to have access to the resources in this * resource share.

*

* You can include the following values: *

*
    *
  • *

    * An Amazon Web Services account ID, for example: 123456789012 *

    *
  • *
  • *

    * An Amazon Resoure * 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 java.util.List getPrincipals() { return principals; } /** *

* Specifies a list of one or more principals that no longer are to have access to the resources in this resource * share. *

*

* You can include the following values: *

*
    *
  • *

    * An Amazon Web Services account ID, for example: 123456789012 *

    *
  • *
  • *

    * An Amazon Resoure 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. *

*
* * @param principals * Specifies a list of one or more principals that no longer are to have access to the resources in this * resource share.

*

* You can include the following values: *

*
    *
  • *

    * An Amazon Web Services account ID, for example: 123456789012 *

    *
  • *
  • *

    * An Amazon Resoure * 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 void setPrincipals(java.util.Collection principals) { if (principals == null) { this.principals = null; return; } this.principals = new java.util.ArrayList(principals); } /** *

* Specifies a list of one or more principals that no longer are to have access to the resources in this resource * share. *

*

* You can include the following values: *

*
    *
  • *

    * An Amazon Web Services account ID, for example: 123456789012 *

    *
  • *
  • *

    * An Amazon Resoure 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. *

*
*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setPrincipals(java.util.Collection)} or {@link #withPrincipals(java.util.Collection)} if you want to * override the existing values. *

* * @param principals * Specifies a list of one or more principals that no longer are to have access to the resources in this * resource share.

*

* You can include the following values: *

*
    *
  • *

    * An Amazon Web Services account ID, for example: 123456789012 *

    *
  • *
  • *

    * An Amazon Resoure * 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. *

* @return Returns a reference to this object so that method calls can be chained together. */ public DisassociateResourceShareRequest withPrincipals(String... principals) { if (this.principals == null) { setPrincipals(new java.util.ArrayList(principals.length)); } for (String ele : principals) { this.principals.add(ele); } return this; } /** *

* Specifies a list of one or more principals that no longer are to have access to the resources in this resource * share. *

*

* You can include the following values: *

*
    *
  • *

    * An Amazon Web Services account ID, for example: 123456789012 *

    *
  • *
  • *

    * An Amazon Resoure 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. *

*
* * @param principals * Specifies a list of one or more principals that no longer are to have access to the resources in this * resource share.

*

* You can include the following values: *

*
    *
  • *

    * An Amazon Web Services account ID, for example: 123456789012 *

    *
  • *
  • *

    * An Amazon Resoure * 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. *

* @return Returns a reference to this object so that method calls can be chained together. */ public DisassociateResourceShareRequest withPrincipals(java.util.Collection principals) { setPrincipals(principals); return this; } /** *

* 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. *

* * @param 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. */ public void setClientToken(String clientToken) { this.clientToken = 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. *

* * @return 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. */ public String getClientToken() { return this.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. *

* * @param 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. * @return Returns a reference to this object so that method calls can be chained together. */ public DisassociateResourceShareRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getResourceShareArn() != null) sb.append("ResourceShareArn: ").append(getResourceShareArn()).append(","); if (getResourceArns() != null) sb.append("ResourceArns: ").append(getResourceArns()).append(","); if (getPrincipals() != null) sb.append("Principals: ").append(getPrincipals()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DisassociateResourceShareRequest == false) return false; DisassociateResourceShareRequest other = (DisassociateResourceShareRequest) obj; if (other.getResourceShareArn() == null ^ this.getResourceShareArn() == null) return false; if (other.getResourceShareArn() != null && other.getResourceShareArn().equals(this.getResourceShareArn()) == false) return false; if (other.getResourceArns() == null ^ this.getResourceArns() == null) return false; if (other.getResourceArns() != null && other.getResourceArns().equals(this.getResourceArns()) == false) return false; if (other.getPrincipals() == null ^ this.getPrincipals() == null) return false; if (other.getPrincipals() != null && other.getPrincipals().equals(this.getPrincipals()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceShareArn() == null) ? 0 : getResourceShareArn().hashCode()); hashCode = prime * hashCode + ((getResourceArns() == null) ? 0 : getResourceArns().hashCode()); hashCode = prime * hashCode + ((getPrincipals() == null) ? 0 : getPrincipals().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); return hashCode; } @Override public DisassociateResourceShareRequest clone() { return (DisassociateResourceShareRequest) super.clone(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy