AWS v6.73.0 published on Wednesday, Mar 19, 2025 by Pulumi
aws.s3.getAccountPublicAccessBlock
Explore with Pulumi AI
The S3 account public access block data source returns account-level public access block configuration.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as aws from "@pulumi/aws";
const example = aws.s3.getAccountPublicAccessBlock({});
import pulumi
import pulumi_aws as aws
example = aws.s3.get_account_public_access_block()
package main
import (
	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/s3"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := s3.LookupAccountPublicAccessBlock(ctx, &s3.LookupAccountPublicAccessBlockArgs{}, nil)
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Aws = Pulumi.Aws;
return await Deployment.RunAsync(() => 
{
    var example = Aws.S3.GetAccountPublicAccessBlock.Invoke();
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.aws.s3.S3Functions;
import com.pulumi.aws.s3.inputs.GetAccountPublicAccessBlockArgs;
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) {
        final var example = S3Functions.getAccountPublicAccessBlock();
    }
}
variables:
  example:
    fn::invoke:
      function: aws:s3:getAccountPublicAccessBlock
      arguments: {}
Using getAccountPublicAccessBlock
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getAccountPublicAccessBlock(args: GetAccountPublicAccessBlockArgs, opts?: InvokeOptions): Promise<GetAccountPublicAccessBlockResult>
function getAccountPublicAccessBlockOutput(args: GetAccountPublicAccessBlockOutputArgs, opts?: InvokeOptions): Output<GetAccountPublicAccessBlockResult>def get_account_public_access_block(account_id: Optional[str] = None,
                                    opts: Optional[InvokeOptions] = None) -> GetAccountPublicAccessBlockResult
def get_account_public_access_block_output(account_id: Optional[pulumi.Input[str]] = None,
                                    opts: Optional[InvokeOptions] = None) -> Output[GetAccountPublicAccessBlockResult]func LookupAccountPublicAccessBlock(ctx *Context, args *LookupAccountPublicAccessBlockArgs, opts ...InvokeOption) (*LookupAccountPublicAccessBlockResult, error)
func LookupAccountPublicAccessBlockOutput(ctx *Context, args *LookupAccountPublicAccessBlockOutputArgs, opts ...InvokeOption) LookupAccountPublicAccessBlockResultOutput> Note: This function is named LookupAccountPublicAccessBlock in the Go SDK.
public static class GetAccountPublicAccessBlock 
{
    public static Task<GetAccountPublicAccessBlockResult> InvokeAsync(GetAccountPublicAccessBlockArgs args, InvokeOptions? opts = null)
    public static Output<GetAccountPublicAccessBlockResult> Invoke(GetAccountPublicAccessBlockInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetAccountPublicAccessBlockResult> getAccountPublicAccessBlock(GetAccountPublicAccessBlockArgs args, InvokeOptions options)
public static Output<GetAccountPublicAccessBlockResult> getAccountPublicAccessBlock(GetAccountPublicAccessBlockArgs args, InvokeOptions options)
fn::invoke:
  function: aws:s3/getAccountPublicAccessBlock:getAccountPublicAccessBlock
  arguments:
    # arguments dictionaryThe following arguments are supported:
- AccountId string
- AWS account ID to configure. Defaults to automatically determined account ID of the AWS provider.
- AccountId string
- AWS account ID to configure. Defaults to automatically determined account ID of the AWS provider.
- accountId String
- AWS account ID to configure. Defaults to automatically determined account ID of the AWS provider.
- accountId string
- AWS account ID to configure. Defaults to automatically determined account ID of the AWS provider.
- account_id str
- AWS account ID to configure. Defaults to automatically determined account ID of the AWS provider.
- accountId String
- AWS account ID to configure. Defaults to automatically determined account ID of the AWS provider.
getAccountPublicAccessBlock Result
The following output properties are available:
- BlockPublic boolAcls 
- Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- BlockPublic boolPolicy 
- Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- Id string
- The provider-assigned unique ID for this managed resource.
- IgnorePublic boolAcls 
- Whether or not Amazon S3 should ignore public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- RestrictPublic boolBuckets 
- Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- AccountId string
- BlockPublic boolAcls 
- Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- BlockPublic boolPolicy 
- Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- Id string
- The provider-assigned unique ID for this managed resource.
- IgnorePublic boolAcls 
- Whether or not Amazon S3 should ignore public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- RestrictPublic boolBuckets 
- Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- AccountId string
- blockPublic BooleanAcls 
- Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- blockPublic BooleanPolicy 
- Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- id String
- The provider-assigned unique ID for this managed resource.
- ignorePublic BooleanAcls 
- Whether or not Amazon S3 should ignore public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- restrictPublic BooleanBuckets 
- Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- accountId String
- blockPublic booleanAcls 
- Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- blockPublic booleanPolicy 
- Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- id string
- The provider-assigned unique ID for this managed resource.
- ignorePublic booleanAcls 
- Whether or not Amazon S3 should ignore public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- restrictPublic booleanBuckets 
- Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- accountId string
- block_public_ boolacls 
- Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- block_public_ boolpolicy 
- Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- id str
- The provider-assigned unique ID for this managed resource.
- ignore_public_ boolacls 
- Whether or not Amazon S3 should ignore public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- restrict_public_ boolbuckets 
- Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- account_id str
- blockPublic BooleanAcls 
- Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- blockPublic BooleanPolicy 
- Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- id String
- The provider-assigned unique ID for this managed resource.
- ignorePublic BooleanAcls 
- Whether or not Amazon S3 should ignore public ACLs for buckets in this account is enabled. Returns as trueorfalse.
- restrictPublic BooleanBuckets 
- Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as trueorfalse.
- accountId String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the awsTerraform Provider.