Skip to content

S3

Bases: DuploResourceV3

apply

Apply a S3

Create or Update a S3 resource with Duplocloud cli.

CLI Usage

duploctl s3 apply -f 's3.yaml'
Contents of the s3.yaml file
Name: test-bucket
AllowPublicAccess: false
EnableVersioning: null
Region: us-west-2
Policies:
 - ssl

Parameters:

Name Type Description Default
body BODY

The resource to apply.

required
wait WAIT

Wait for the resource to be created.

False
patches PATCHES

The patches to apply to the resource.

None

Returns:

Name Type Description
message dict

Success message.

create

Create a S3 resource.

CLI Usage

duploctl s3 create -f 's3.yaml'
Contents of the s3.yaml file
Name: test-bucket
AllowPublicAccess: false
EnableVersioning: null
Region: us-west-2
Policies:
 - ssl

One liner example
echo """
Name: test-bucket
AllowPublicAccess: false
EnableVersioning: null
Region: us-west-2
Policies:
 - ssl
""" | duploctl s3 create -f -

Parameters:

Name Type Description Default
body BODY

The resource to create.

required
wait

Wait for the resource to be created.

required
wait_check callable

A callable function to check if the resource

None

Returns:

Name Type Description
message dict

Success message.

Raises:

Type Description
DuploError

If the resource could not be created.

delete

Delete a S3 resource by name.

cli usage
duploctl s3 delete <name>

Parameters:

Name Type Description Default
name NAME

The name of the S3 resource to delete.

required

Returns:

Name Type Description
message dict

A success message.

Raises:

Type Description
DuploError

If the {{kind}} resource could not be found or deleted.

endpoint

Portal-scoped endpoint for V3 resources.

Returns a v3 API path for portal-level resources. This will be overridden by tenant-scoped injection if scope="tenant".

find

Find S3 resources by name.

cli usage
duploctl s3 find <name>

Parameters:

Name Type Description Default
name NAME

The name of the S3 resource to find.

required

Returns:

Name Type Description
resource dict

The S3 object.

Raises:

Type Description
DuploError

If the {{kind}} could not be found.

list

Retrieve a List of S3 resources

cli usage
duploctl s3 list

Returns:

Name Type Description
list list

A list of S3.

update

Update a V3 resource by name.

Parameters:

Name Type Description Default
name NAME

The name of the resource to update.

None
body BODY

The resource to update.

None
patches PATCHES

The patches to apply to the resource.

None

Returns:

Name Type Description
message

Success message.

Raises:

Type Description
DuploError

If the resource could not be created.

wait

Wait for Resource

Waits for a the given wait_check callable to complete successfully. If the global wait_timeout is set on the DuploClient, it will override the timeout parameter so that a user can always choose their own timeout for waiting operations. The timeout param for other functions is just a default value for that particular resource operation.

Parameters:

Name Type Description Default
wait_check callable

A callable function to check if the resource is ready.

required
timeout int

The maximum time to wait in seconds. Default is 3600 seconds (1 hour).

3600
poll int

The polling interval in seconds. Default is 10 seconds.

10