AWS v6.54.0 published on Friday, Sep 27, 2024 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, nil, 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)
// Output-based functions aren't available in Java yet
fn::invoke:
function: aws:s3/getAccountPublicAccessBlock:getAccountPublicAccessBlock
arguments:
# arguments dictionary
The following arguments are supported:
- Account
Id string - AWS account ID to configure. Defaults to automatically determined account ID of the AWS provider.
- Account
Id string - AWS account ID to configure. Defaults to automatically determined account ID of the AWS provider.
- account
Id String - AWS account ID to configure. Defaults to automatically determined account ID of the AWS provider.
- account
Id 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.
- account
Id String - AWS account ID to configure. Defaults to automatically determined account ID of the AWS provider.
getAccountPublicAccessBlock Result
The following output properties are available:
- Block
Public boolAcls - Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as
true
orfalse
. - Block
Public boolPolicy - Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - Id string
- 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
true
orfalse
. - Restrict
Public boolBuckets - Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - Account
Id string
- Block
Public boolAcls - Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as
true
orfalse
. - Block
Public boolPolicy - Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - Id string
- 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
true
orfalse
. - Restrict
Public boolBuckets - Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - Account
Id string
- block
Public BooleanAcls - Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as
true
orfalse
. - block
Public BooleanPolicy - Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - id String
- The provider-assigned unique ID for this managed resource.
- ignore
Public BooleanAcls - Whether or not Amazon S3 should ignore public ACLs for buckets in this account is enabled. Returns as
true
orfalse
. - restrict
Public BooleanBuckets - Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - account
Id String
- block
Public booleanAcls - Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as
true
orfalse
. - block
Public booleanPolicy - Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - id string
- The provider-assigned unique ID for this managed resource.
- ignore
Public booleanAcls - Whether or not Amazon S3 should ignore public ACLs for buckets in this account is enabled. Returns as
true
orfalse
. - restrict
Public booleanBuckets - Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - account
Id string
- block_
public_ boolacls - Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as
true
orfalse
. - block_
public_ boolpolicy - Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - 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
true
orfalse
. - restrict_
public_ boolbuckets - Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - account_
id str
- block
Public BooleanAcls - Whether or not Amazon S3 should block public ACLs for buckets in this account is enabled. Returns as
true
orfalse
. - block
Public BooleanPolicy - Whether or not Amazon S3 should block public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - id String
- The provider-assigned unique ID for this managed resource.
- ignore
Public BooleanAcls - Whether or not Amazon S3 should ignore public ACLs for buckets in this account is enabled. Returns as
true
orfalse
. - restrict
Public BooleanBuckets - Whether or not Amazon S3 should restrict public bucket policies for buckets in this account is enabled. Returns as
true
orfalse
. - account
Id String
Package Details
- Repository
- AWS Classic pulumi/pulumi-aws
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
aws
Terraform Provider.