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

Describes the anonymous access permissions for an Amazon Lightsail bucket and * its objects.

For more information about bucket access permissions, see Understanding * bucket permissions in Amazon Lightsail in the

Amazon Lightsail * Developer Guide.

See Also:

AWS * API Reference

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

Specifies the anonymous access to all objects in a bucket.

The * following options can be specified:

  • public - Sets * all objects in the bucket to public (read-only), making them readable by anyone * in the world.

    If the getObject value is set to * public, then all objects in the bucket default to public regardless * of the allowPublicOverrides value.

  • * private - Sets all objects in the bucket to private, making them * readable only by you or anyone you give access to.

    If the * getObject value is set to private, and the * allowPublicOverrides value is set to true, then all * objects in the bucket default to private unless they are configured with a * public-read ACL. Individual objects with a public-read * ACL are readable by anyone in the world.

*/ inline const AccessType& GetGetObject() const{ return m_getObject; } /** *

Specifies the anonymous access to all objects in a bucket.

The * following options can be specified:

  • public - Sets * all objects in the bucket to public (read-only), making them readable by anyone * in the world.

    If the getObject value is set to * public, then all objects in the bucket default to public regardless * of the allowPublicOverrides value.

  • * private - Sets all objects in the bucket to private, making them * readable only by you or anyone you give access to.

    If the * getObject value is set to private, and the * allowPublicOverrides value is set to true, then all * objects in the bucket default to private unless they are configured with a * public-read ACL. Individual objects with a public-read * ACL are readable by anyone in the world.

*/ inline bool GetObjectHasBeenSet() const { return m_getObjectHasBeenSet; } /** *

Specifies the anonymous access to all objects in a bucket.

The * following options can be specified:

  • public - Sets * all objects in the bucket to public (read-only), making them readable by anyone * in the world.

    If the getObject value is set to * public, then all objects in the bucket default to public regardless * of the allowPublicOverrides value.

  • * private - Sets all objects in the bucket to private, making them * readable only by you or anyone you give access to.

    If the * getObject value is set to private, and the * allowPublicOverrides value is set to true, then all * objects in the bucket default to private unless they are configured with a * public-read ACL. Individual objects with a public-read * ACL are readable by anyone in the world.

*/ inline void SetGetObject(const AccessType& value) { m_getObjectHasBeenSet = true; m_getObject = value; } /** *

Specifies the anonymous access to all objects in a bucket.

The * following options can be specified:

  • public - Sets * all objects in the bucket to public (read-only), making them readable by anyone * in the world.

    If the getObject value is set to * public, then all objects in the bucket default to public regardless * of the allowPublicOverrides value.

  • * private - Sets all objects in the bucket to private, making them * readable only by you or anyone you give access to.

    If the * getObject value is set to private, and the * allowPublicOverrides value is set to true, then all * objects in the bucket default to private unless they are configured with a * public-read ACL. Individual objects with a public-read * ACL are readable by anyone in the world.

*/ inline void SetGetObject(AccessType&& value) { m_getObjectHasBeenSet = true; m_getObject = std::move(value); } /** *

Specifies the anonymous access to all objects in a bucket.

The * following options can be specified:

  • public - Sets * all objects in the bucket to public (read-only), making them readable by anyone * in the world.

    If the getObject value is set to * public, then all objects in the bucket default to public regardless * of the allowPublicOverrides value.

  • * private - Sets all objects in the bucket to private, making them * readable only by you or anyone you give access to.

    If the * getObject value is set to private, and the * allowPublicOverrides value is set to true, then all * objects in the bucket default to private unless they are configured with a * public-read ACL. Individual objects with a public-read * ACL are readable by anyone in the world.

*/ inline AccessRules& WithGetObject(const AccessType& value) { SetGetObject(value); return *this;} /** *

Specifies the anonymous access to all objects in a bucket.

The * following options can be specified:

  • public - Sets * all objects in the bucket to public (read-only), making them readable by anyone * in the world.

    If the getObject value is set to * public, then all objects in the bucket default to public regardless * of the allowPublicOverrides value.

  • * private - Sets all objects in the bucket to private, making them * readable only by you or anyone you give access to.

    If the * getObject value is set to private, and the * allowPublicOverrides value is set to true, then all * objects in the bucket default to private unless they are configured with a * public-read ACL. Individual objects with a public-read * ACL are readable by anyone in the world.

*/ inline AccessRules& WithGetObject(AccessType&& value) { SetGetObject(std::move(value)); return *this;} /** *

A Boolean value that indicates whether the access control list (ACL) * permissions that are applied to individual objects override the * getObject option that is currently specified.

When this is * true, you can use the PutObjectAcl * Amazon S3 API action to set individual objects to public (read-only) using the * public-read ACL, or to private using the private * ACL.

*/ inline bool GetAllowPublicOverrides() const{ return m_allowPublicOverrides; } /** *

A Boolean value that indicates whether the access control list (ACL) * permissions that are applied to individual objects override the * getObject option that is currently specified.

When this is * true, you can use the PutObjectAcl * Amazon S3 API action to set individual objects to public (read-only) using the * public-read ACL, or to private using the private * ACL.

*/ inline bool AllowPublicOverridesHasBeenSet() const { return m_allowPublicOverridesHasBeenSet; } /** *

A Boolean value that indicates whether the access control list (ACL) * permissions that are applied to individual objects override the * getObject option that is currently specified.

When this is * true, you can use the PutObjectAcl * Amazon S3 API action to set individual objects to public (read-only) using the * public-read ACL, or to private using the private * ACL.

*/ inline void SetAllowPublicOverrides(bool value) { m_allowPublicOverridesHasBeenSet = true; m_allowPublicOverrides = value; } /** *

A Boolean value that indicates whether the access control list (ACL) * permissions that are applied to individual objects override the * getObject option that is currently specified.

When this is * true, you can use the PutObjectAcl * Amazon S3 API action to set individual objects to public (read-only) using the * public-read ACL, or to private using the private * ACL.

*/ inline AccessRules& WithAllowPublicOverrides(bool value) { SetAllowPublicOverrides(value); return *this;} private: AccessType m_getObject; bool m_getObjectHasBeenSet = false; bool m_allowPublicOverrides; bool m_allowPublicOverridesHasBeenSet = false; }; } // namespace Model } // namespace Lightsail } // namespace Aws