1. Packages
  2. Hsdp Provider
  3. API Docs
  4. BlrBlobStorePolicy
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

hsdp.BlrBlobStorePolicy

Explore with Pulumi AI

hsdp logo
hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software

    Create and manage Blob Repository Policies

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as hsdp from "@pulumi/hsdp";
    
    const policy = new hsdp.BlrBlobStorePolicy("policy", {statement: {
        actions: [
            "GET",
            "PUT",
            "DELETE",
        ],
        effect: "Allow",
        principals: [`prn:hsdp:iam:${data.hsdp_iam_org.myorg.id}:${hsdp_connect_mdm_proposition.first.guid}:User/*`],
        resources: [`${hsdp_blr_bucket.store.name}/*`],
    }});
    
    import pulumi
    import pulumi_hsdp as hsdp
    
    policy = hsdp.BlrBlobStorePolicy("policy", statement={
        "actions": [
            "GET",
            "PUT",
            "DELETE",
        ],
        "effect": "Allow",
        "principals": [f"prn:hsdp:iam:{data['hsdp_iam_org']['myorg']['id']}:{hsdp_connect_mdm_proposition['first']['guid']}:User/*"],
        "resources": [f"{hsdp_blr_bucket['store']['name']}/*"],
    })
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/hsdp/hsdp"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := hsdp.NewBlrBlobStorePolicy(ctx, "policy", &hsdp.BlrBlobStorePolicyArgs{
    			Statement: &hsdp.BlrBlobStorePolicyStatementArgs{
    				Actions: pulumi.StringArray{
    					pulumi.String("GET"),
    					pulumi.String("PUT"),
    					pulumi.String("DELETE"),
    				},
    				Effect: pulumi.String("Allow"),
    				Principals: pulumi.StringArray{
    					pulumi.Sprintf("prn:hsdp:iam:%v:%v:User/*", data.Hsdp_iam_org.Myorg.Id, hsdp_connect_mdm_proposition.First.Guid),
    				},
    				Resources: pulumi.StringArray{
    					pulumi.Sprintf("%v/*", hsdp_blr_bucket.Store.Name),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Hsdp = Pulumi.Hsdp;
    
    return await Deployment.RunAsync(() => 
    {
        var policy = new Hsdp.BlrBlobStorePolicy("policy", new()
        {
            Statement = new Hsdp.Inputs.BlrBlobStorePolicyStatementArgs
            {
                Actions = new[]
                {
                    "GET",
                    "PUT",
                    "DELETE",
                },
                Effect = "Allow",
                Principals = new[]
                {
                    $"prn:hsdp:iam:{data.Hsdp_iam_org.Myorg.Id}:{hsdp_connect_mdm_proposition.First.Guid}:User/*",
                },
                Resources = new[]
                {
                    $"{hsdp_blr_bucket.Store.Name}/*",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.hsdp.BlrBlobStorePolicy;
    import com.pulumi.hsdp.BlrBlobStorePolicyArgs;
    import com.pulumi.hsdp.inputs.BlrBlobStorePolicyStatementArgs;
    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 policy = new BlrBlobStorePolicy("policy", BlrBlobStorePolicyArgs.builder()
                .statement(BlrBlobStorePolicyStatementArgs.builder()
                    .actions(                
                        "GET",
                        "PUT",
                        "DELETE")
                    .effect("Allow")
                    .principals(String.format("prn:hsdp:iam:%s:%s:User/*", data.hsdp_iam_org().myorg().id(),hsdp_connect_mdm_proposition.first().guid()))
                    .resources(String.format("%s/*", hsdp_blr_bucket.store().name()))
                    .build())
                .build());
    
        }
    }
    
    resources:
      policy:
        type: hsdp:BlrBlobStorePolicy
        properties:
          statement:
            actions:
              - GET
              - PUT
              - DELETE
            effect: Allow
            principals:
              - prn:hsdp:iam:${data.hsdp_iam_org.myorg.id}:${hsdp_connect_mdm_proposition.first.guid}:User/*
            resources:
              - ${hsdp_blr_bucket.store.name}/*
    

    Attributes reference

    In addition to all arguments above, the following attributes are exported:

    • id - The ID reference of the service action (format: BlobStorePolicy/${GUID})
    • guid - The GUID of the bucket

    Create BlrBlobStorePolicy Resource

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

    Constructor syntax

    new BlrBlobStorePolicy(name: string, args: BlrBlobStorePolicyArgs, opts?: CustomResourceOptions);
    @overload
    def BlrBlobStorePolicy(resource_name: str,
                           args: BlrBlobStorePolicyArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def BlrBlobStorePolicy(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           statement: Optional[BlrBlobStorePolicyStatementArgs] = None,
                           blr_blob_store_policy_id: Optional[str] = None,
                           principal: Optional[BlrBlobStorePolicyPrincipalArgs] = None)
    func NewBlrBlobStorePolicy(ctx *Context, name string, args BlrBlobStorePolicyArgs, opts ...ResourceOption) (*BlrBlobStorePolicy, error)
    public BlrBlobStorePolicy(string name, BlrBlobStorePolicyArgs args, CustomResourceOptions? opts = null)
    public BlrBlobStorePolicy(String name, BlrBlobStorePolicyArgs args)
    public BlrBlobStorePolicy(String name, BlrBlobStorePolicyArgs args, CustomResourceOptions options)
    
    type: hsdp:BlrBlobStorePolicy
    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 BlrBlobStorePolicyArgs
    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 BlrBlobStorePolicyArgs
    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 BlrBlobStorePolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BlrBlobStorePolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BlrBlobStorePolicyArgs
    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 blrBlobStorePolicyResource = new Hsdp.BlrBlobStorePolicy("blrBlobStorePolicyResource", new()
    {
        Statement = new Hsdp.Inputs.BlrBlobStorePolicyStatementArgs
        {
            Actions = new[]
            {
                "string",
            },
            Effect = "string",
            Principals = new[]
            {
                "string",
            },
            Resources = new[]
            {
                "string",
            },
        },
        BlrBlobStorePolicyId = "string",
        Principal = new Hsdp.Inputs.BlrBlobStorePolicyPrincipalArgs
        {
            Endpoint = "string",
            Environment = "string",
            Oauth2ClientId = "string",
            Oauth2Password = "string",
            Password = "string",
            Region = "string",
            ServiceId = "string",
            ServicePrivateKey = "string",
            UaaPassword = "string",
            UaaUsername = "string",
            Username = "string",
        },
    });
    
    example, err := hsdp.NewBlrBlobStorePolicy(ctx, "blrBlobStorePolicyResource", &hsdp.BlrBlobStorePolicyArgs{
    	Statement: &hsdp.BlrBlobStorePolicyStatementArgs{
    		Actions: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Effect: pulumi.String("string"),
    		Principals: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    		Resources: pulumi.StringArray{
    			pulumi.String("string"),
    		},
    	},
    	BlrBlobStorePolicyId: pulumi.String("string"),
    	Principal: &hsdp.BlrBlobStorePolicyPrincipalArgs{
    		Endpoint:          pulumi.String("string"),
    		Environment:       pulumi.String("string"),
    		Oauth2ClientId:    pulumi.String("string"),
    		Oauth2Password:    pulumi.String("string"),
    		Password:          pulumi.String("string"),
    		Region:            pulumi.String("string"),
    		ServiceId:         pulumi.String("string"),
    		ServicePrivateKey: pulumi.String("string"),
    		UaaPassword:       pulumi.String("string"),
    		UaaUsername:       pulumi.String("string"),
    		Username:          pulumi.String("string"),
    	},
    })
    
    var blrBlobStorePolicyResource = new BlrBlobStorePolicy("blrBlobStorePolicyResource", BlrBlobStorePolicyArgs.builder()
        .statement(BlrBlobStorePolicyStatementArgs.builder()
            .actions("string")
            .effect("string")
            .principals("string")
            .resources("string")
            .build())
        .blrBlobStorePolicyId("string")
        .principal(BlrBlobStorePolicyPrincipalArgs.builder()
            .endpoint("string")
            .environment("string")
            .oauth2ClientId("string")
            .oauth2Password("string")
            .password("string")
            .region("string")
            .serviceId("string")
            .servicePrivateKey("string")
            .uaaPassword("string")
            .uaaUsername("string")
            .username("string")
            .build())
        .build());
    
    blr_blob_store_policy_resource = hsdp.BlrBlobStorePolicy("blrBlobStorePolicyResource",
        statement={
            "actions": ["string"],
            "effect": "string",
            "principals": ["string"],
            "resources": ["string"],
        },
        blr_blob_store_policy_id="string",
        principal={
            "endpoint": "string",
            "environment": "string",
            "oauth2_client_id": "string",
            "oauth2_password": "string",
            "password": "string",
            "region": "string",
            "service_id": "string",
            "service_private_key": "string",
            "uaa_password": "string",
            "uaa_username": "string",
            "username": "string",
        })
    
    const blrBlobStorePolicyResource = new hsdp.BlrBlobStorePolicy("blrBlobStorePolicyResource", {
        statement: {
            actions: ["string"],
            effect: "string",
            principals: ["string"],
            resources: ["string"],
        },
        blrBlobStorePolicyId: "string",
        principal: {
            endpoint: "string",
            environment: "string",
            oauth2ClientId: "string",
            oauth2Password: "string",
            password: "string",
            region: "string",
            serviceId: "string",
            servicePrivateKey: "string",
            uaaPassword: "string",
            uaaUsername: "string",
            username: "string",
        },
    });
    
    type: hsdp:BlrBlobStorePolicy
    properties:
        blrBlobStorePolicyId: string
        principal:
            endpoint: string
            environment: string
            oauth2ClientId: string
            oauth2Password: string
            password: string
            region: string
            serviceId: string
            servicePrivateKey: string
            uaaPassword: string
            uaaUsername: string
            username: string
        statement:
            actions:
                - string
            effect: string
            principals:
                - string
            resources:
                - string
    

    BlrBlobStorePolicy 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 BlrBlobStorePolicy resource accepts the following input properties:

    Outputs

    All input properties are implicitly available as output properties. Additionally, the BlrBlobStorePolicy resource produces the following output properties:

    Guid string
    Id string
    The provider-assigned unique ID for this managed resource.
    Guid string
    Id string
    The provider-assigned unique ID for this managed resource.
    guid String
    id String
    The provider-assigned unique ID for this managed resource.
    guid string
    id string
    The provider-assigned unique ID for this managed resource.
    guid str
    id str
    The provider-assigned unique ID for this managed resource.
    guid String
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BlrBlobStorePolicy Resource

    Get an existing BlrBlobStorePolicy 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?: BlrBlobStorePolicyState, opts?: CustomResourceOptions): BlrBlobStorePolicy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            blr_blob_store_policy_id: Optional[str] = None,
            guid: Optional[str] = None,
            principal: Optional[BlrBlobStorePolicyPrincipalArgs] = None,
            statement: Optional[BlrBlobStorePolicyStatementArgs] = None) -> BlrBlobStorePolicy
    func GetBlrBlobStorePolicy(ctx *Context, name string, id IDInput, state *BlrBlobStorePolicyState, opts ...ResourceOption) (*BlrBlobStorePolicy, error)
    public static BlrBlobStorePolicy Get(string name, Input<string> id, BlrBlobStorePolicyState? state, CustomResourceOptions? opts = null)
    public static BlrBlobStorePolicy get(String name, Output<String> id, BlrBlobStorePolicyState state, CustomResourceOptions options)
    resources:  _:    type: hsdp:BlrBlobStorePolicy    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.

    Supporting Types

    BlrBlobStorePolicyPrincipal, BlrBlobStorePolicyPrincipalArgs

    BlrBlobStorePolicyStatement, BlrBlobStorePolicyStatementArgs

    Actions List<string>
    ) Allowed methods: [GET, PUT, DELETE]
    Effect string
    Effect of policy [Allow, Deny]
    Principals List<string>
    ) The principals the policy applies to
    Resources List<string>
    ) The resources the policy applies to
    Actions []string
    ) Allowed methods: [GET, PUT, DELETE]
    Effect string
    Effect of policy [Allow, Deny]
    Principals []string
    ) The principals the policy applies to
    Resources []string
    ) The resources the policy applies to
    actions List<String>
    ) Allowed methods: [GET, PUT, DELETE]
    effect String
    Effect of policy [Allow, Deny]
    principals List<String>
    ) The principals the policy applies to
    resources List<String>
    ) The resources the policy applies to
    actions string[]
    ) Allowed methods: [GET, PUT, DELETE]
    effect string
    Effect of policy [Allow, Deny]
    principals string[]
    ) The principals the policy applies to
    resources string[]
    ) The resources the policy applies to
    actions Sequence[str]
    ) Allowed methods: [GET, PUT, DELETE]
    effect str
    Effect of policy [Allow, Deny]
    principals Sequence[str]
    ) The principals the policy applies to
    resources Sequence[str]
    ) The resources the policy applies to
    actions List<String>
    ) Allowed methods: [GET, PUT, DELETE]
    effect String
    Effect of policy [Allow, Deny]
    principals List<String>
    ) The principals the policy applies to
    resources List<String>
    ) The resources the policy applies to

    Package Details

    Repository
    hsdp philips-software/terraform-provider-hsdp
    License
    Notes
    This Pulumi package is based on the hsdp Terraform Provider.
    hsdp logo
    hsdp 0.65.3 published on Tuesday, Apr 15, 2025 by philips-software