/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace RAM { namespace Model { /** *

Describes a resource share in RAM.

See Also:

AWS * API Reference

*/ class ResourceShare { public: AWS_RAM_API ResourceShare(); AWS_RAM_API ResourceShare(Aws::Utils::Json::JsonView jsonValue); AWS_RAM_API ResourceShare& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_RAM_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The Amazon * Resource Name (ARN) of the resource share

*/ inline const Aws::String& GetResourceShareArn() const{ return m_resourceShareArn; } /** *

The Amazon * Resource Name (ARN) of the resource share

*/ inline bool ResourceShareArnHasBeenSet() const { return m_resourceShareArnHasBeenSet; } /** *

The Amazon * Resource Name (ARN) of the resource share

*/ inline void SetResourceShareArn(const Aws::String& value) { m_resourceShareArnHasBeenSet = true; m_resourceShareArn = value; } /** *

The Amazon * Resource Name (ARN) of the resource share

*/ inline void SetResourceShareArn(Aws::String&& value) { m_resourceShareArnHasBeenSet = true; m_resourceShareArn = std::move(value); } /** *

The Amazon * Resource Name (ARN) of the resource share

*/ inline void SetResourceShareArn(const char* value) { m_resourceShareArnHasBeenSet = true; m_resourceShareArn.assign(value); } /** *

The Amazon * Resource Name (ARN) of the resource share

*/ inline ResourceShare& WithResourceShareArn(const Aws::String& value) { SetResourceShareArn(value); return *this;} /** *

The Amazon * Resource Name (ARN) of the resource share

*/ inline ResourceShare& WithResourceShareArn(Aws::String&& value) { SetResourceShareArn(std::move(value)); return *this;} /** *

The Amazon * Resource Name (ARN) of the resource share

*/ inline ResourceShare& WithResourceShareArn(const char* value) { SetResourceShareArn(value); return *this;} /** *

The name of the resource share.

*/ inline const Aws::String& GetName() const{ return m_name; } /** *

The name of the resource share.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the resource share.

*/ inline void SetName(const Aws::String& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the resource share.

*/ inline void SetName(Aws::String&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the resource share.

*/ inline void SetName(const char* value) { m_nameHasBeenSet = true; m_name.assign(value); } /** *

The name of the resource share.

*/ inline ResourceShare& WithName(const Aws::String& value) { SetName(value); return *this;} /** *

The name of the resource share.

*/ inline ResourceShare& WithName(Aws::String&& value) { SetName(std::move(value)); return *this;} /** *

The name of the resource share.

*/ inline ResourceShare& WithName(const char* value) { SetName(value); return *this;} /** *

The ID of the Amazon Web Services account that owns the resource share.

*/ inline const Aws::String& GetOwningAccountId() const{ return m_owningAccountId; } /** *

The ID of the Amazon Web Services account that owns the resource share.

*/ inline bool OwningAccountIdHasBeenSet() const { return m_owningAccountIdHasBeenSet; } /** *

The ID of the Amazon Web Services account that owns the resource share.

*/ inline void SetOwningAccountId(const Aws::String& value) { m_owningAccountIdHasBeenSet = true; m_owningAccountId = value; } /** *

The ID of the Amazon Web Services account that owns the resource share.

*/ inline void SetOwningAccountId(Aws::String&& value) { m_owningAccountIdHasBeenSet = true; m_owningAccountId = std::move(value); } /** *

The ID of the Amazon Web Services account that owns the resource share.

*/ inline void SetOwningAccountId(const char* value) { m_owningAccountIdHasBeenSet = true; m_owningAccountId.assign(value); } /** *

The ID of the Amazon Web Services account that owns the resource share.

*/ inline ResourceShare& WithOwningAccountId(const Aws::String& value) { SetOwningAccountId(value); return *this;} /** *

The ID of the Amazon Web Services account that owns the resource share.

*/ inline ResourceShare& WithOwningAccountId(Aws::String&& value) { SetOwningAccountId(std::move(value)); return *this;} /** *

The ID of the Amazon Web Services account that owns the resource share.

*/ inline ResourceShare& WithOwningAccountId(const char* value) { SetOwningAccountId(value); return *this;} /** *

Indicates whether principals outside your organization in Organizations can * be associated with a resource share.

  • True – the * resource share can be shared with any Amazon Web Services account.

  • *
  • False – the resource share can be shared with only * accounts in the same organization as the account that owns the resource * share.

*/ inline bool GetAllowExternalPrincipals() const{ return m_allowExternalPrincipals; } /** *

Indicates whether principals outside your organization in Organizations can * be associated with a resource share.

  • True – the * resource share can be shared with any Amazon Web Services account.

  • *
  • False – the resource share can be shared with only * accounts in the same organization as the account that owns the resource * share.

*/ inline bool AllowExternalPrincipalsHasBeenSet() const { return m_allowExternalPrincipalsHasBeenSet; } /** *

Indicates whether principals outside your organization in Organizations can * be associated with a resource share.

  • True – the * resource share can be shared with any Amazon Web Services account.

  • *
  • False – the resource share can be shared with only * accounts in the same organization as the account that owns the resource * share.

*/ inline void SetAllowExternalPrincipals(bool value) { m_allowExternalPrincipalsHasBeenSet = true; m_allowExternalPrincipals = value; } /** *

Indicates whether principals outside your organization in Organizations can * be associated with a resource share.

  • True – the * resource share can be shared with any Amazon Web Services account.

  • *
  • False – the resource share can be shared with only * accounts in the same organization as the account that owns the resource * share.

*/ inline ResourceShare& WithAllowExternalPrincipals(bool value) { SetAllowExternalPrincipals(value); return *this;} /** *

The current status of the resource share.

*/ inline const ResourceShareStatus& GetStatus() const{ return m_status; } /** *

The current status of the resource share.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The current status of the resource share.

*/ inline void SetStatus(const ResourceShareStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The current status of the resource share.

*/ inline void SetStatus(ResourceShareStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The current status of the resource share.

*/ inline ResourceShare& WithStatus(const ResourceShareStatus& value) { SetStatus(value); return *this;} /** *

The current status of the resource share.

*/ inline ResourceShare& WithStatus(ResourceShareStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

A message about the status of the resource share.

*/ inline const Aws::String& GetStatusMessage() const{ return m_statusMessage; } /** *

A message about the status of the resource share.

*/ inline bool StatusMessageHasBeenSet() const { return m_statusMessageHasBeenSet; } /** *

A message about the status of the resource share.

*/ inline void SetStatusMessage(const Aws::String& value) { m_statusMessageHasBeenSet = true; m_statusMessage = value; } /** *

A message about the status of the resource share.

*/ inline void SetStatusMessage(Aws::String&& value) { m_statusMessageHasBeenSet = true; m_statusMessage = std::move(value); } /** *

A message about the status of the resource share.

*/ inline void SetStatusMessage(const char* value) { m_statusMessageHasBeenSet = true; m_statusMessage.assign(value); } /** *

A message about the status of the resource share.

*/ inline ResourceShare& WithStatusMessage(const Aws::String& value) { SetStatusMessage(value); return *this;} /** *

A message about the status of the resource share.

*/ inline ResourceShare& WithStatusMessage(Aws::String&& value) { SetStatusMessage(std::move(value)); return *this;} /** *

A message about the status of the resource share.

*/ inline ResourceShare& WithStatusMessage(const char* value) { SetStatusMessage(value); return *this;} /** *

The tag key and value pairs attached to the resource share.

*/ inline const Aws::Vector& GetTags() const{ return m_tags; } /** *

The tag key and value pairs attached to the resource share.

*/ inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; } /** *

The tag key and value pairs attached to the resource share.

*/ inline void SetTags(const Aws::Vector& value) { m_tagsHasBeenSet = true; m_tags = value; } /** *

The tag key and value pairs attached to the resource share.

*/ inline void SetTags(Aws::Vector&& value) { m_tagsHasBeenSet = true; m_tags = std::move(value); } /** *

The tag key and value pairs attached to the resource share.

*/ inline ResourceShare& WithTags(const Aws::Vector& value) { SetTags(value); return *this;} /** *

The tag key and value pairs attached to the resource share.

*/ inline ResourceShare& WithTags(Aws::Vector&& value) { SetTags(std::move(value)); return *this;} /** *

The tag key and value pairs attached to the resource share.

*/ inline ResourceShare& AddTags(const Tag& value) { m_tagsHasBeenSet = true; m_tags.push_back(value); return *this; } /** *

The tag key and value pairs attached to the resource share.

*/ inline ResourceShare& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } /** *

The date and time when the resource share was created.

*/ inline const Aws::Utils::DateTime& GetCreationTime() const{ return m_creationTime; } /** *

The date and time when the resource share was created.

*/ inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; } /** *

The date and time when the resource share was created.

*/ inline void SetCreationTime(const Aws::Utils::DateTime& value) { m_creationTimeHasBeenSet = true; m_creationTime = value; } /** *

The date and time when the resource share was created.

*/ inline void SetCreationTime(Aws::Utils::DateTime&& value) { m_creationTimeHasBeenSet = true; m_creationTime = std::move(value); } /** *

The date and time when the resource share was created.

*/ inline ResourceShare& WithCreationTime(const Aws::Utils::DateTime& value) { SetCreationTime(value); return *this;} /** *

The date and time when the resource share was created.

*/ inline ResourceShare& WithCreationTime(Aws::Utils::DateTime&& value) { SetCreationTime(std::move(value)); return *this;} /** *

The date and time when the resource share was last updated.

*/ inline const Aws::Utils::DateTime& GetLastUpdatedTime() const{ return m_lastUpdatedTime; } /** *

The date and time when the resource share was last updated.

*/ inline bool LastUpdatedTimeHasBeenSet() const { return m_lastUpdatedTimeHasBeenSet; } /** *

The date and time when the resource share was last updated.

*/ inline void SetLastUpdatedTime(const Aws::Utils::DateTime& value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = value; } /** *

The date and time when the resource share was last updated.

*/ inline void SetLastUpdatedTime(Aws::Utils::DateTime&& value) { m_lastUpdatedTimeHasBeenSet = true; m_lastUpdatedTime = std::move(value); } /** *

The date and time when the resource share was last updated.

*/ inline ResourceShare& WithLastUpdatedTime(const Aws::Utils::DateTime& value) { SetLastUpdatedTime(value); return *this;} /** *

The date and time when the resource share was last updated.

*/ inline ResourceShare& WithLastUpdatedTime(Aws::Utils::DateTime&& value) { SetLastUpdatedTime(std::move(value)); return *this;} /** *

Indicates what features are available for this resource share. This parameter * can have one of the following values:

  • STANDARD – A * resource share that supports all functionality. These resource shares are * visible to all principals you share the resource share with. You can modify * these resource shares in RAM using the console or APIs. This resource share * might have been created by RAM, or it might have been CREATED_FROM_POLICY * and then promoted.

  • CREATED_FROM_POLICY – The customer * manually shared a resource by attaching a resource-based policy. That policy did * not match any existing managed permissions, so RAM created this customer managed * permission automatically on the customer's behalf based on the attached policy * document. This type of resource share is visible only to the Amazon Web Services * account that created it. You can't modify it in RAM unless you promote it. For * more information, see PromoteResourceShareCreatedFromPolicy.

  • *
  • PROMOTING_TO_STANDARD – This resource share was originally * CREATED_FROM_POLICY, but the customer ran the * PromoteResourceShareCreatedFromPolicy and that operation is still in * progress. This value changes to STANDARD when complete.

  • *
*/ inline const ResourceShareFeatureSet& GetFeatureSet() const{ return m_featureSet; } /** *

Indicates what features are available for this resource share. This parameter * can have one of the following values:

  • STANDARD – A * resource share that supports all functionality. These resource shares are * visible to all principals you share the resource share with. You can modify * these resource shares in RAM using the console or APIs. This resource share * might have been created by RAM, or it might have been CREATED_FROM_POLICY * and then promoted.

  • CREATED_FROM_POLICY – The customer * manually shared a resource by attaching a resource-based policy. That policy did * not match any existing managed permissions, so RAM created this customer managed * permission automatically on the customer's behalf based on the attached policy * document. This type of resource share is visible only to the Amazon Web Services * account that created it. You can't modify it in RAM unless you promote it. For * more information, see PromoteResourceShareCreatedFromPolicy.

  • *
  • PROMOTING_TO_STANDARD – This resource share was originally * CREATED_FROM_POLICY, but the customer ran the * PromoteResourceShareCreatedFromPolicy and that operation is still in * progress. This value changes to STANDARD when complete.

  • *
*/ inline bool FeatureSetHasBeenSet() const { return m_featureSetHasBeenSet; } /** *

Indicates what features are available for this resource share. This parameter * can have one of the following values:

  • STANDARD – A * resource share that supports all functionality. These resource shares are * visible to all principals you share the resource share with. You can modify * these resource shares in RAM using the console or APIs. This resource share * might have been created by RAM, or it might have been CREATED_FROM_POLICY * and then promoted.

  • CREATED_FROM_POLICY – The customer * manually shared a resource by attaching a resource-based policy. That policy did * not match any existing managed permissions, so RAM created this customer managed * permission automatically on the customer's behalf based on the attached policy * document. This type of resource share is visible only to the Amazon Web Services * account that created it. You can't modify it in RAM unless you promote it. For * more information, see PromoteResourceShareCreatedFromPolicy.

  • *
  • PROMOTING_TO_STANDARD – This resource share was originally * CREATED_FROM_POLICY, but the customer ran the * PromoteResourceShareCreatedFromPolicy and that operation is still in * progress. This value changes to STANDARD when complete.

  • *
*/ inline void SetFeatureSet(const ResourceShareFeatureSet& value) { m_featureSetHasBeenSet = true; m_featureSet = value; } /** *

Indicates what features are available for this resource share. This parameter * can have one of the following values:

  • STANDARD – A * resource share that supports all functionality. These resource shares are * visible to all principals you share the resource share with. You can modify * these resource shares in RAM using the console or APIs. This resource share * might have been created by RAM, or it might have been CREATED_FROM_POLICY * and then promoted.

  • CREATED_FROM_POLICY – The customer * manually shared a resource by attaching a resource-based policy. That policy did * not match any existing managed permissions, so RAM created this customer managed * permission automatically on the customer's behalf based on the attached policy * document. This type of resource share is visible only to the Amazon Web Services * account that created it. You can't modify it in RAM unless you promote it. For * more information, see PromoteResourceShareCreatedFromPolicy.

  • *
  • PROMOTING_TO_STANDARD – This resource share was originally * CREATED_FROM_POLICY, but the customer ran the * PromoteResourceShareCreatedFromPolicy and that operation is still in * progress. This value changes to STANDARD when complete.

  • *
*/ inline void SetFeatureSet(ResourceShareFeatureSet&& value) { m_featureSetHasBeenSet = true; m_featureSet = std::move(value); } /** *

Indicates what features are available for this resource share. This parameter * can have one of the following values:

  • STANDARD – A * resource share that supports all functionality. These resource shares are * visible to all principals you share the resource share with. You can modify * these resource shares in RAM using the console or APIs. This resource share * might have been created by RAM, or it might have been CREATED_FROM_POLICY * and then promoted.

  • CREATED_FROM_POLICY – The customer * manually shared a resource by attaching a resource-based policy. That policy did * not match any existing managed permissions, so RAM created this customer managed * permission automatically on the customer's behalf based on the attached policy * document. This type of resource share is visible only to the Amazon Web Services * account that created it. You can't modify it in RAM unless you promote it. For * more information, see PromoteResourceShareCreatedFromPolicy.

  • *
  • PROMOTING_TO_STANDARD – This resource share was originally * CREATED_FROM_POLICY, but the customer ran the * PromoteResourceShareCreatedFromPolicy and that operation is still in * progress. This value changes to STANDARD when complete.

  • *
*/ inline ResourceShare& WithFeatureSet(const ResourceShareFeatureSet& value) { SetFeatureSet(value); return *this;} /** *

Indicates what features are available for this resource share. This parameter * can have one of the following values:

  • STANDARD – A * resource share that supports all functionality. These resource shares are * visible to all principals you share the resource share with. You can modify * these resource shares in RAM using the console or APIs. This resource share * might have been created by RAM, or it might have been CREATED_FROM_POLICY * and then promoted.

  • CREATED_FROM_POLICY – The customer * manually shared a resource by attaching a resource-based policy. That policy did * not match any existing managed permissions, so RAM created this customer managed * permission automatically on the customer's behalf based on the attached policy * document. This type of resource share is visible only to the Amazon Web Services * account that created it. You can't modify it in RAM unless you promote it. For * more information, see PromoteResourceShareCreatedFromPolicy.

  • *
  • PROMOTING_TO_STANDARD – This resource share was originally * CREATED_FROM_POLICY, but the customer ran the * PromoteResourceShareCreatedFromPolicy and that operation is still in * progress. This value changes to STANDARD when complete.

  • *
*/ inline ResourceShare& WithFeatureSet(ResourceShareFeatureSet&& value) { SetFeatureSet(std::move(value)); return *this;} private: Aws::String m_resourceShareArn; bool m_resourceShareArnHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_owningAccountId; bool m_owningAccountIdHasBeenSet = false; bool m_allowExternalPrincipals; bool m_allowExternalPrincipalsHasBeenSet = false; ResourceShareStatus m_status; bool m_statusHasBeenSet = false; Aws::String m_statusMessage; bool m_statusMessageHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; Aws::Utils::DateTime m_creationTime; bool m_creationTimeHasBeenSet = false; Aws::Utils::DateTime m_lastUpdatedTime; bool m_lastUpdatedTimeHasBeenSet = false; ResourceShareFeatureSet m_featureSet; bool m_featureSetHasBeenSet = false; }; } // namespace Model } // namespace RAM } // namespace Aws