Class AccessRules
- java.lang.Object
-
- software.amazon.awssdk.services.lightsail.model.AccessRules
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<AccessRules.Builder,AccessRules>
@Generated("software.amazon.awssdk:codegen") public final class AccessRules extends Object implements SdkPojo, Serializable, 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAccessRules.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description BooleanallowPublicOverrides()A Boolean value that indicates whether the access control list (ACL) permissions that are applied to individual objects override thegetObjectoption that is currently specified.static AccessRules.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)AccessTypegetObject()Specifies the anonymous access to all objects in a bucket.StringgetObjectAsString()Specifies the anonymous access to all objects in a bucket.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)inthashCode()List<SdkField<?>>sdkFields()static Class<? extends AccessRules.Builder>serializableBuilderClass()AccessRules.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
getObject
public final AccessType 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
getObjectvalue is set topublic, then all objects in the bucket default to public regardless of theallowPublicOverridesvalue. -
private- Sets all objects in the bucket to private, making them readable only by you or anyone you give access to.If the
getObjectvalue is set toprivate, and theallowPublicOverridesvalue is set totrue, then all objects in the bucket default to private unless they are configured with apublic-readACL. Individual objects with apublic-readACL are readable by anyone in the world.
If the service returns an enum value that is not available in the current SDK version,
getObjectwill 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
getObjectvalue is set topublic, then all objects in the bucket default to public regardless of theallowPublicOverridesvalue. -
private- Sets all objects in the bucket to private, making them readable only by you or anyone you give access to.If the
getObjectvalue is set toprivate, and theallowPublicOverridesvalue is set totrue, then all objects in the bucket default to private unless they are configured with apublic-readACL. Individual objects with apublic-readACL are readable by anyone in the world.
-
- See Also:
AccessType
-
-
getObjectAsString
public final String 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
getObjectvalue is set topublic, then all objects in the bucket default to public regardless of theallowPublicOverridesvalue. -
private- Sets all objects in the bucket to private, making them readable only by you or anyone you give access to.If the
getObjectvalue is set toprivate, and theallowPublicOverridesvalue is set totrue, then all objects in the bucket default to private unless they are configured with apublic-readACL. Individual objects with apublic-readACL are readable by anyone in the world.
If the service returns an enum value that is not available in the current SDK version,
getObjectwill 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
getObjectvalue is set topublic, then all objects in the bucket default to public regardless of theallowPublicOverridesvalue. -
private- Sets all objects in the bucket to private, making them readable only by you or anyone you give access to.If the
getObjectvalue is set toprivate, and theallowPublicOverridesvalue is set totrue, then all objects in the bucket default to private unless they are configured with apublic-readACL. Individual objects with apublic-readACL are readable by anyone in the world.
-
- See Also:
AccessType
-
-
allowPublicOverrides
public final Boolean allowPublicOverrides()
A Boolean value that indicates whether the access control list (ACL) permissions that are applied to individual objects override the
getObjectoption 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-readACL, or to private using theprivateACL.- Returns:
- A Boolean value that indicates whether the access control list (ACL) permissions that are applied to
individual objects override the
getObjectoption 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-readACL, or to private using theprivateACL.
-
toBuilder
public AccessRules.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<AccessRules.Builder,AccessRules>
-
builder
public static AccessRules.Builder builder()
-
serializableBuilderClass
public static Class<? extends AccessRules.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String 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.
-
-