Class AccessRules
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<AccessRules.Builder,
AccessRules>
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:
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal Boolean
A Boolean value that indicates whether the access control list (ACL) permissions that are applied to individual objects override thegetObject
option that is currently specified.static AccessRules.Builder
builder()
final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final AccessType
Specifies the anonymous access to all objects in a bucket.final String
Specifies the anonymous access to all objects in a bucket.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final int
hashCode()
static Class
<? extends AccessRules.Builder> Take this object and create a builder that contains all of the current property values of this object.final String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
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 topublic
, then all objects in the bucket default to public regardless of theallowPublicOverrides
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 toprivate
, and theallowPublicOverrides
value is set totrue
, then all objects in the bucket default to private unless they are configured with apublic-read
ACL. Individual objects with apublic-read
ACL are readable by anyone in the world.
If the service returns an enum value that is not available in the current SDK version,
getObject
will returnAccessType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromgetObjectAsString()
.- Returns:
- 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 topublic
, then all objects in the bucket default to public regardless of theallowPublicOverrides
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 toprivate
, and theallowPublicOverrides
value is set totrue
, then all objects in the bucket default to private unless they are configured with apublic-read
ACL. Individual objects with apublic-read
ACL are readable by anyone in the world.
-
- See Also:
-
-
getObjectAsString
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 topublic
, then all objects in the bucket default to public regardless of theallowPublicOverrides
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 toprivate
, and theallowPublicOverrides
value is set totrue
, then all objects in the bucket default to private unless they are configured with apublic-read
ACL. Individual objects with apublic-read
ACL are readable by anyone in the world.
If the service returns an enum value that is not available in the current SDK version,
getObject
will returnAccessType.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromgetObjectAsString()
.- Returns:
- 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 topublic
, then all objects in the bucket default to public regardless of theallowPublicOverrides
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 toprivate
, and theallowPublicOverrides
value is set totrue
, then all objects in the bucket default to private unless they are configured with apublic-read
ACL. Individual objects with apublic-read
ACL are readable by anyone in the world.
-
- See Also:
-
-
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 theprivate
ACL.- Returns:
- 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 theprivate
ACL.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<AccessRules.Builder,
AccessRules> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in interfaceSdkPojo
- Parameters:
obj
- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
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. -
getValueForField
-
sdkFields
-