ionoscloud.S3BucketPublicAccessBlock
Explore with Pulumi AI
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as ionoscloud from "@pulumi/ionoscloud";
const example = new ionoscloud.S3BucketPublicAccessBlock("example", {
bucket: ionoscloud_s3_bucket.example.name,
ignorePublicAcls: true,
restrictPublicBuckets: true,
blockPublicPolicy: false,
blockPublicAcls: false,
});
import pulumi
import pulumi_ionoscloud as ionoscloud
example = ionoscloud.S3BucketPublicAccessBlock("example",
bucket=ionoscloud_s3_bucket["example"]["name"],
ignore_public_acls=True,
restrict_public_buckets=True,
block_public_policy=False,
block_public_acls=False)
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/ionoscloud/v6/ionoscloud"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := ionoscloud.NewS3BucketPublicAccessBlock(ctx, "example", &ionoscloud.S3BucketPublicAccessBlockArgs{
Bucket: pulumi.Any(ionoscloud_s3_bucket.Example.Name),
IgnorePublicAcls: pulumi.Bool(true),
RestrictPublicBuckets: pulumi.Bool(true),
BlockPublicPolicy: pulumi.Bool(false),
BlockPublicAcls: pulumi.Bool(false),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Ionoscloud = Pulumi.Ionoscloud;
return await Deployment.RunAsync(() =>
{
var example = new Ionoscloud.S3BucketPublicAccessBlock("example", new()
{
Bucket = ionoscloud_s3_bucket.Example.Name,
IgnorePublicAcls = true,
RestrictPublicBuckets = true,
BlockPublicPolicy = false,
BlockPublicAcls = false,
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.ionoscloud.S3BucketPublicAccessBlock;
import com.pulumi.ionoscloud.S3BucketPublicAccessBlockArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
var example = new S3BucketPublicAccessBlock("example", S3BucketPublicAccessBlockArgs.builder()
.bucket(ionoscloud_s3_bucket.example().name())
.ignorePublicAcls(true)
.restrictPublicBuckets(true)
.blockPublicPolicy(false)
.blockPublicAcls(false)
.build());
}
}
resources:
example:
type: ionoscloud:S3BucketPublicAccessBlock
properties:
bucket: ${ionoscloud_s3_bucket.example.name}
ignorePublicAcls: true
restrictPublicBuckets: true
blockPublicPolicy: false
blockPublicAcls: false
Create S3BucketPublicAccessBlock Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new S3BucketPublicAccessBlock(name: string, args: S3BucketPublicAccessBlockArgs, opts?: CustomResourceOptions);
@overload
def S3BucketPublicAccessBlock(resource_name: str,
args: S3BucketPublicAccessBlockArgs,
opts: Optional[ResourceOptions] = None)
@overload
def S3BucketPublicAccessBlock(resource_name: str,
opts: Optional[ResourceOptions] = None,
bucket: Optional[str] = None,
block_public_acls: Optional[bool] = None,
block_public_policy: Optional[bool] = None,
ignore_public_acls: Optional[bool] = None,
restrict_public_buckets: Optional[bool] = None)
func NewS3BucketPublicAccessBlock(ctx *Context, name string, args S3BucketPublicAccessBlockArgs, opts ...ResourceOption) (*S3BucketPublicAccessBlock, error)
public S3BucketPublicAccessBlock(string name, S3BucketPublicAccessBlockArgs args, CustomResourceOptions? opts = null)
public S3BucketPublicAccessBlock(String name, S3BucketPublicAccessBlockArgs args)
public S3BucketPublicAccessBlock(String name, S3BucketPublicAccessBlockArgs args, CustomResourceOptions options)
type: ionoscloud:S3BucketPublicAccessBlock
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args S3BucketPublicAccessBlockArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args S3BucketPublicAccessBlockArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args S3BucketPublicAccessBlockArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args S3BucketPublicAccessBlockArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args S3BucketPublicAccessBlockArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var s3bucketPublicAccessBlockResource = new Ionoscloud.S3BucketPublicAccessBlock("s3bucketPublicAccessBlockResource", new()
{
Bucket = "string",
BlockPublicAcls = false,
BlockPublicPolicy = false,
IgnorePublicAcls = false,
RestrictPublicBuckets = false,
});
example, err := ionoscloud.NewS3BucketPublicAccessBlock(ctx, "s3bucketPublicAccessBlockResource", &ionoscloud.S3BucketPublicAccessBlockArgs{
Bucket: pulumi.String("string"),
BlockPublicAcls: pulumi.Bool(false),
BlockPublicPolicy: pulumi.Bool(false),
IgnorePublicAcls: pulumi.Bool(false),
RestrictPublicBuckets: pulumi.Bool(false),
})
var s3bucketPublicAccessBlockResource = new S3BucketPublicAccessBlock("s3bucketPublicAccessBlockResource", S3BucketPublicAccessBlockArgs.builder()
.bucket("string")
.blockPublicAcls(false)
.blockPublicPolicy(false)
.ignorePublicAcls(false)
.restrictPublicBuckets(false)
.build());
s3bucket_public_access_block_resource = ionoscloud.S3BucketPublicAccessBlock("s3bucketPublicAccessBlockResource",
bucket="string",
block_public_acls=False,
block_public_policy=False,
ignore_public_acls=False,
restrict_public_buckets=False)
const s3bucketPublicAccessBlockResource = new ionoscloud.S3BucketPublicAccessBlock("s3bucketPublicAccessBlockResource", {
bucket: "string",
blockPublicAcls: false,
blockPublicPolicy: false,
ignorePublicAcls: false,
restrictPublicBuckets: false,
});
type: ionoscloud:S3BucketPublicAccessBlock
properties:
blockPublicAcls: false
blockPublicPolicy: false
bucket: string
ignorePublicAcls: false
restrictPublicBuckets: false
S3BucketPublicAccessBlock Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The S3BucketPublicAccessBlock resource accepts the following input properties:
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Block
Public boolAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- Block
Public boolPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- Ignore
Public boolAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- Restrict
Public boolBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Block
Public boolAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- Block
Public boolPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- Ignore
Public boolAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- Restrict
Public boolBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- bucket String
- [string] The name of the bucket where the object will be stored.
- block
Public BooleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public BooleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- ignore
Public BooleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public BooleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- bucket string
- [string] The name of the bucket where the object will be stored.
- block
Public booleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public booleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- ignore
Public booleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public booleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- bucket str
- [string] The name of the bucket where the object will be stored.
- block_
public_ boolacls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block_
public_ boolpolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- ignore_
public_ boolacls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict_
public_ boolbuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- bucket String
- [string] The name of the bucket where the object will be stored.
- block
Public BooleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public BooleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- ignore
Public BooleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public BooleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
Outputs
All input properties are implicitly available as output properties. Additionally, the S3BucketPublicAccessBlock resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing S3BucketPublicAccessBlock Resource
Get an existing S3BucketPublicAccessBlock resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: S3BucketPublicAccessBlockState, opts?: CustomResourceOptions): S3BucketPublicAccessBlock
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
block_public_acls: Optional[bool] = None,
block_public_policy: Optional[bool] = None,
bucket: Optional[str] = None,
ignore_public_acls: Optional[bool] = None,
restrict_public_buckets: Optional[bool] = None) -> S3BucketPublicAccessBlock
func GetS3BucketPublicAccessBlock(ctx *Context, name string, id IDInput, state *S3BucketPublicAccessBlockState, opts ...ResourceOption) (*S3BucketPublicAccessBlock, error)
public static S3BucketPublicAccessBlock Get(string name, Input<string> id, S3BucketPublicAccessBlockState? state, CustomResourceOptions? opts = null)
public static S3BucketPublicAccessBlock get(String name, Output<String> id, S3BucketPublicAccessBlockState state, CustomResourceOptions options)
resources: _: type: ionoscloud:S3BucketPublicAccessBlock get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Block
Public boolAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- Block
Public boolPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Ignore
Public boolAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- Restrict
Public boolBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- Block
Public boolAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- Block
Public boolPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- Bucket string
- [string] The name of the bucket where the object will be stored.
- Ignore
Public boolAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- Restrict
Public boolBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- block
Public BooleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public BooleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- bucket String
- [string] The name of the bucket where the object will be stored.
- ignore
Public BooleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public BooleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- block
Public booleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public booleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- bucket string
- [string] The name of the bucket where the object will be stored.
- ignore
Public booleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public booleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- block_
public_ boolacls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block_
public_ boolpolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- bucket str
- [string] The name of the bucket where the object will be stored.
- ignore_
public_ boolacls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict_
public_ boolbuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
- block
Public BooleanAcls - [bool] Indicates that access to the bucket via Access Control Lists (ACLs) that grant public access is blocked. In other words, ACLs that allow public access are not permitted.
- block
Public BooleanPolicy - [bool] Blocks public access to the bucket via bucket policies. Bucket policies that grant public access will not be allowed.
- bucket String
- [string] The name of the bucket where the object will be stored.
- ignore
Public BooleanAcls - [bool] Instructs the system to ignore any ACLs that grant public access. Even if ACLs are set to allow public access, they will be disregarded.
- restrict
Public BooleanBuckets - [bool] Restricts access to buckets that have public policies. Buckets with policies that grant public access will have their access restricted.
Import
Resource Bucket access block can be imported using the bucket name
$ pulumi import ionoscloud:index/s3BucketPublicAccessBlock:S3BucketPublicAccessBlock example example
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- ionoscloud ionos-cloud/terraform-provider-ionoscloud
- License
- Notes
- This Pulumi package is based on the
ionoscloud
Terraform Provider.