/** * 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 { /** *

Information about an RAM permission.

See Also:

AWS * API Reference

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

The Amazon * Resource Name (ARN) of the permission you want information about.

*/ inline const Aws::String& GetArn() const{ return m_arn; } /** *

The Amazon * Resource Name (ARN) of the permission you want information about.

*/ inline bool ArnHasBeenSet() const { return m_arnHasBeenSet; } /** *

The Amazon * Resource Name (ARN) of the permission you want information about.

*/ inline void SetArn(const Aws::String& value) { m_arnHasBeenSet = true; m_arn = value; } /** *

The Amazon * Resource Name (ARN) of the permission you want information about.

*/ inline void SetArn(Aws::String&& value) { m_arnHasBeenSet = true; m_arn = std::move(value); } /** *

The Amazon * Resource Name (ARN) of the permission you want information about.

*/ inline void SetArn(const char* value) { m_arnHasBeenSet = true; m_arn.assign(value); } /** *

The Amazon * Resource Name (ARN) of the permission you want information about.

*/ inline ResourceSharePermissionSummary& WithArn(const Aws::String& value) { SetArn(value); return *this;} /** *

The Amazon * Resource Name (ARN) of the permission you want information about.

*/ inline ResourceSharePermissionSummary& WithArn(Aws::String&& value) { SetArn(std::move(value)); return *this;} /** *

The Amazon * Resource Name (ARN) of the permission you want information about.

*/ inline ResourceSharePermissionSummary& WithArn(const char* value) { SetArn(value); return *this;} /** *

The version of the permission associated with this resource share.

*/ inline const Aws::String& GetVersion() const{ return m_version; } /** *

The version of the permission associated with this resource share.

*/ inline bool VersionHasBeenSet() const { return m_versionHasBeenSet; } /** *

The version of the permission associated with this resource share.

*/ inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; } /** *

The version of the permission associated with this resource share.

*/ inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = std::move(value); } /** *

The version of the permission associated with this resource share.

*/ inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); } /** *

The version of the permission associated with this resource share.

*/ inline ResourceSharePermissionSummary& WithVersion(const Aws::String& value) { SetVersion(value); return *this;} /** *

The version of the permission associated with this resource share.

*/ inline ResourceSharePermissionSummary& WithVersion(Aws::String&& value) { SetVersion(std::move(value)); return *this;} /** *

The version of the permission associated with this resource share.

*/ inline ResourceSharePermissionSummary& WithVersion(const char* value) { SetVersion(value); return *this;} /** *

Specifies whether the version of the managed permission used by this resource * share is the default version for this managed permission.

*/ inline bool GetDefaultVersion() const{ return m_defaultVersion; } /** *

Specifies whether the version of the managed permission used by this resource * share is the default version for this managed permission.

*/ inline bool DefaultVersionHasBeenSet() const { return m_defaultVersionHasBeenSet; } /** *

Specifies whether the version of the managed permission used by this resource * share is the default version for this managed permission.

*/ inline void SetDefaultVersion(bool value) { m_defaultVersionHasBeenSet = true; m_defaultVersion = value; } /** *

Specifies whether the version of the managed permission used by this resource * share is the default version for this managed permission.

*/ inline ResourceSharePermissionSummary& WithDefaultVersion(bool value) { SetDefaultVersion(value); return *this;} /** *

The name of this managed permission.

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

The name of this managed permission.

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

The name of this managed permission.

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

The name of this managed permission.

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

The name of this managed permission.

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

The name of this managed permission.

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

The name of this managed permission.

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

The name of this managed permission.

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

The type of resource to which this permission applies. This takes the form * of: service-code:resource-code, and is * case-insensitive. For example, an Amazon EC2 Subnet would be represented by the * string ec2:subnet.

*/ inline const Aws::String& GetResourceType() const{ return m_resourceType; } /** *

The type of resource to which this permission applies. This takes the form * of: service-code:resource-code, and is * case-insensitive. For example, an Amazon EC2 Subnet would be represented by the * string ec2:subnet.

*/ inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; } /** *

The type of resource to which this permission applies. This takes the form * of: service-code:resource-code, and is * case-insensitive. For example, an Amazon EC2 Subnet would be represented by the * string ec2:subnet.

*/ inline void SetResourceType(const Aws::String& value) { m_resourceTypeHasBeenSet = true; m_resourceType = value; } /** *

The type of resource to which this permission applies. This takes the form * of: service-code:resource-code, and is * case-insensitive. For example, an Amazon EC2 Subnet would be represented by the * string ec2:subnet.

*/ inline void SetResourceType(Aws::String&& value) { m_resourceTypeHasBeenSet = true; m_resourceType = std::move(value); } /** *

The type of resource to which this permission applies. This takes the form * of: service-code:resource-code, and is * case-insensitive. For example, an Amazon EC2 Subnet would be represented by the * string ec2:subnet.

*/ inline void SetResourceType(const char* value) { m_resourceTypeHasBeenSet = true; m_resourceType.assign(value); } /** *

The type of resource to which this permission applies. This takes the form * of: service-code:resource-code, and is * case-insensitive. For example, an Amazon EC2 Subnet would be represented by the * string ec2:subnet.

*/ inline ResourceSharePermissionSummary& WithResourceType(const Aws::String& value) { SetResourceType(value); return *this;} /** *

The type of resource to which this permission applies. This takes the form * of: service-code:resource-code, and is * case-insensitive. For example, an Amazon EC2 Subnet would be represented by the * string ec2:subnet.

*/ inline ResourceSharePermissionSummary& WithResourceType(Aws::String&& value) { SetResourceType(std::move(value)); return *this;} /** *

The type of resource to which this permission applies. This takes the form * of: service-code:resource-code, and is * case-insensitive. For example, an Amazon EC2 Subnet would be represented by the * string ec2:subnet.

*/ inline ResourceSharePermissionSummary& WithResourceType(const char* value) { SetResourceType(value); return *this;} /** *

The current status of the permission.

*/ inline const Aws::String& GetStatus() const{ return m_status; } /** *

The current status of the permission.

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

The current status of the permission.

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

The current status of the permission.

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

The current status of the permission.

*/ inline void SetStatus(const char* value) { m_statusHasBeenSet = true; m_status.assign(value); } /** *

The current status of the permission.

*/ inline ResourceSharePermissionSummary& WithStatus(const Aws::String& value) { SetStatus(value); return *this;} /** *

The current status of the permission.

*/ inline ResourceSharePermissionSummary& WithStatus(Aws::String&& value) { SetStatus(std::move(value)); return *this;} /** *

The current status of the permission.

*/ inline ResourceSharePermissionSummary& WithStatus(const char* value) { SetStatus(value); return *this;} /** *

The date and time when the permission was created.

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

The date and time when the permission was created.

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

The date and time when the permission was created.

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

The date and time when the permission was created.

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

The date and time when the permission was created.

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

The date and time when the permission was created.

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

The date and time when the permission was last updated.

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

The date and time when the permission was last updated.

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

The date and time when the permission was last updated.

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

The date and time when the permission was last updated.

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

The date and time when the permission was last updated.

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

The date and time when the permission was last updated.

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

Specifies whether the managed permission associated with this resource share * is the default managed permission for all resources of this resource type.

*/ inline bool GetIsResourceTypeDefault() const{ return m_isResourceTypeDefault; } /** *

Specifies whether the managed permission associated with this resource share * is the default managed permission for all resources of this resource type.

*/ inline bool IsResourceTypeDefaultHasBeenSet() const { return m_isResourceTypeDefaultHasBeenSet; } /** *

Specifies whether the managed permission associated with this resource share * is the default managed permission for all resources of this resource type.

*/ inline void SetIsResourceTypeDefault(bool value) { m_isResourceTypeDefaultHasBeenSet = true; m_isResourceTypeDefault = value; } /** *

Specifies whether the managed permission associated with this resource share * is the default managed permission for all resources of this resource type.

*/ inline ResourceSharePermissionSummary& WithIsResourceTypeDefault(bool value) { SetIsResourceTypeDefault(value); return *this;} /** *

The type of managed permission. This can be one of the following values:

*
  • AWS_MANAGED – Amazon Web Services created and manages * this managed permission. You can associate it with your resource shares, but you * can't modify it.

  • CUSTOMER_MANAGED – You, or * another principal in your account created this managed permission. You can * associate it with your resource shares and create new versions that have * different permissions.

*/ inline const PermissionType& GetPermissionType() const{ return m_permissionType; } /** *

The type of managed permission. This can be one of the following values:

*
  • AWS_MANAGED – Amazon Web Services created and manages * this managed permission. You can associate it with your resource shares, but you * can't modify it.

  • CUSTOMER_MANAGED – You, or * another principal in your account created this managed permission. You can * associate it with your resource shares and create new versions that have * different permissions.

*/ inline bool PermissionTypeHasBeenSet() const { return m_permissionTypeHasBeenSet; } /** *

The type of managed permission. This can be one of the following values:

*
  • AWS_MANAGED – Amazon Web Services created and manages * this managed permission. You can associate it with your resource shares, but you * can't modify it.

  • CUSTOMER_MANAGED – You, or * another principal in your account created this managed permission. You can * associate it with your resource shares and create new versions that have * different permissions.

*/ inline void SetPermissionType(const PermissionType& value) { m_permissionTypeHasBeenSet = true; m_permissionType = value; } /** *

The type of managed permission. This can be one of the following values:

*
  • AWS_MANAGED – Amazon Web Services created and manages * this managed permission. You can associate it with your resource shares, but you * can't modify it.

  • CUSTOMER_MANAGED – You, or * another principal in your account created this managed permission. You can * associate it with your resource shares and create new versions that have * different permissions.

*/ inline void SetPermissionType(PermissionType&& value) { m_permissionTypeHasBeenSet = true; m_permissionType = std::move(value); } /** *

The type of managed permission. This can be one of the following values:

*
  • AWS_MANAGED – Amazon Web Services created and manages * this managed permission. You can associate it with your resource shares, but you * can't modify it.

  • CUSTOMER_MANAGED – You, or * another principal in your account created this managed permission. You can * associate it with your resource shares and create new versions that have * different permissions.

*/ inline ResourceSharePermissionSummary& WithPermissionType(const PermissionType& value) { SetPermissionType(value); return *this;} /** *

The type of managed permission. This can be one of the following values:

*
  • AWS_MANAGED – Amazon Web Services created and manages * this managed permission. You can associate it with your resource shares, but you * can't modify it.

  • CUSTOMER_MANAGED – You, or * another principal in your account created this managed permission. You can * associate it with your resource shares and create new versions that have * different permissions.

*/ inline ResourceSharePermissionSummary& WithPermissionType(PermissionType&& value) { SetPermissionType(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 PermissionFeatureSet& 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 PermissionFeatureSet& 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(PermissionFeatureSet&& 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 ResourceSharePermissionSummary& WithFeatureSet(const PermissionFeatureSet& 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 ResourceSharePermissionSummary& WithFeatureSet(PermissionFeatureSet&& value) { SetFeatureSet(std::move(value)); return *this;} /** *

A list of the tag key value pairs currently attached to the permission.

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

A list of the tag key value pairs currently attached to the permission.

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

A list of the tag key value pairs currently attached to the permission.

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

A list of the tag key value pairs currently attached to the permission.

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

A list of the tag key value pairs currently attached to the permission.

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

A list of the tag key value pairs currently attached to the permission.

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

A list of the tag key value pairs currently attached to the permission.

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

A list of the tag key value pairs currently attached to the permission.

*/ inline ResourceSharePermissionSummary& AddTags(Tag&& value) { m_tagsHasBeenSet = true; m_tags.push_back(std::move(value)); return *this; } private: Aws::String m_arn; bool m_arnHasBeenSet = false; Aws::String m_version; bool m_versionHasBeenSet = false; bool m_defaultVersion; bool m_defaultVersionHasBeenSet = false; Aws::String m_name; bool m_nameHasBeenSet = false; Aws::String m_resourceType; bool m_resourceTypeHasBeenSet = false; Aws::String m_status; bool m_statusHasBeenSet = false; Aws::Utils::DateTime m_creationTime; bool m_creationTimeHasBeenSet = false; Aws::Utils::DateTime m_lastUpdatedTime; bool m_lastUpdatedTimeHasBeenSet = false; bool m_isResourceTypeDefault; bool m_isResourceTypeDefaultHasBeenSet = false; PermissionType m_permissionType; bool m_permissionTypeHasBeenSet = false; PermissionFeatureSet m_featureSet; bool m_featureSetHasBeenSet = false; Aws::Vector m_tags; bool m_tagsHasBeenSet = false; }; } // namespace Model } // namespace RAM } // namespace Aws