1. Packages
  2. AWS
  3. API Docs
  4. ebs
  5. SnapshotBlockPublicAccess
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

aws.ebs.SnapshotBlockPublicAccess

Explore with Pulumi AI

aws logo
AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as aws from "@pulumi/aws";
    
    const example = new aws.ebs.SnapshotBlockPublicAccess("example", {state: "block-all-sharing"});
    
    import pulumi
    import pulumi_aws as aws
    
    example = aws.ebs.SnapshotBlockPublicAccess("example", state="block-all-sharing")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-aws/sdk/v6/go/aws/ebs"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := ebs.NewSnapshotBlockPublicAccess(ctx, "example", &ebs.SnapshotBlockPublicAccessArgs{
    			State: pulumi.String("block-all-sharing"),
    		})
    		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 = new Aws.Ebs.SnapshotBlockPublicAccess("example", new()
        {
            State = "block-all-sharing",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.aws.ebs.SnapshotBlockPublicAccess;
    import com.pulumi.aws.ebs.SnapshotBlockPublicAccessArgs;
    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 SnapshotBlockPublicAccess("example", SnapshotBlockPublicAccessArgs.builder()
                .state("block-all-sharing")
                .build());
    
        }
    }
    
    resources:
      example:
        type: aws:ebs:SnapshotBlockPublicAccess
        properties:
          state: block-all-sharing
    

    Create SnapshotBlockPublicAccess Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new SnapshotBlockPublicAccess(name: string, args: SnapshotBlockPublicAccessArgs, opts?: CustomResourceOptions);
    @overload
    def SnapshotBlockPublicAccess(resource_name: str,
                                  args: SnapshotBlockPublicAccessArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def SnapshotBlockPublicAccess(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  state: Optional[str] = None)
    func NewSnapshotBlockPublicAccess(ctx *Context, name string, args SnapshotBlockPublicAccessArgs, opts ...ResourceOption) (*SnapshotBlockPublicAccess, error)
    public SnapshotBlockPublicAccess(string name, SnapshotBlockPublicAccessArgs args, CustomResourceOptions? opts = null)
    public SnapshotBlockPublicAccess(String name, SnapshotBlockPublicAccessArgs args)
    public SnapshotBlockPublicAccess(String name, SnapshotBlockPublicAccessArgs args, CustomResourceOptions options)
    
    type: aws:ebs:SnapshotBlockPublicAccess
    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 SnapshotBlockPublicAccessArgs
    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 SnapshotBlockPublicAccessArgs
    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 SnapshotBlockPublicAccessArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args SnapshotBlockPublicAccessArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args SnapshotBlockPublicAccessArgs
    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 snapshotBlockPublicAccessResource = new Aws.Ebs.SnapshotBlockPublicAccess("snapshotBlockPublicAccessResource", new()
    {
        State = "string",
    });
    
    example, err := ebs.NewSnapshotBlockPublicAccess(ctx, "snapshotBlockPublicAccessResource", &ebs.SnapshotBlockPublicAccessArgs{
    	State: pulumi.String("string"),
    })
    
    var snapshotBlockPublicAccessResource = new SnapshotBlockPublicAccess("snapshotBlockPublicAccessResource", SnapshotBlockPublicAccessArgs.builder()
        .state("string")
        .build());
    
    snapshot_block_public_access_resource = aws.ebs.SnapshotBlockPublicAccess("snapshotBlockPublicAccessResource", state="string")
    
    const snapshotBlockPublicAccessResource = new aws.ebs.SnapshotBlockPublicAccess("snapshotBlockPublicAccessResource", {state: "string"});
    
    type: aws:ebs:SnapshotBlockPublicAccess
    properties:
        state: string
    

    SnapshotBlockPublicAccess Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The SnapshotBlockPublicAccess resource accepts the following input properties:

    State string
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.
    State string
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.
    state String
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.
    state string
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.
    state str
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.
    state String
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the SnapshotBlockPublicAccess 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 SnapshotBlockPublicAccess Resource

    Get an existing SnapshotBlockPublicAccess 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?: SnapshotBlockPublicAccessState, opts?: CustomResourceOptions): SnapshotBlockPublicAccess
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            state: Optional[str] = None) -> SnapshotBlockPublicAccess
    func GetSnapshotBlockPublicAccess(ctx *Context, name string, id IDInput, state *SnapshotBlockPublicAccessState, opts ...ResourceOption) (*SnapshotBlockPublicAccess, error)
    public static SnapshotBlockPublicAccess Get(string name, Input<string> id, SnapshotBlockPublicAccessState? state, CustomResourceOptions? opts = null)
    public static SnapshotBlockPublicAccess get(String name, Output<String> id, SnapshotBlockPublicAccessState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    State string
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.
    State string
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.
    state String
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.
    state string
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.
    state str
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.
    state String
    The mode in which to enable "Block public access for snapshots" for the region. Allowed values are block-all-sharing, block-new-sharing, unblocked.

    Import

    Using pulumi import, import the state. For example:

    $ pulumi import aws:ebs/snapshotBlockPublicAccess:SnapshotBlockPublicAccess example default
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    AWS Classic pulumi/pulumi-aws
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the aws Terraform Provider.
    aws logo
    AWS v6.54.0 published on Friday, Sep 27, 2024 by Pulumi