1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. resourcemanager
  5. ResourceShare
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.resourcemanager.ResourceShare

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    Provides a Resource Manager Resource Share resource.

    For information about Resource Manager Resource Share and how to use it, see What is Resource Share.

    NOTE: Available since v1.111.0.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const name = config.get("name") || "tf-example";
    const example = new alicloud.resourcemanager.ResourceShare("example", {resourceShareName: name});
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    name = config.get("name")
    if name is None:
        name = "tf-example"
    example = alicloud.resourcemanager.ResourceShare("example", resource_share_name=name)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		name := "tf-example"
    		if param := cfg.Get("name"); param != "" {
    			name = param
    		}
    		_, err := resourcemanager.NewResourceShare(ctx, "example", &resourcemanager.ResourceShareArgs{
    			ResourceShareName: pulumi.String(name),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var name = config.Get("name") ?? "tf-example";
        var example = new AliCloud.ResourceManager.ResourceShare("example", new()
        {
            ResourceShareName = name,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ResourceShare;
    import com.pulumi.alicloud.resourcemanager.ResourceShareArgs;
    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 config = ctx.config();
            final var name = config.get("name").orElse("tf-example");
            var example = new ResourceShare("example", ResourceShareArgs.builder()        
                .resourceShareName(name)
                .build());
    
        }
    }
    
    configuration:
      name:
        type: string
        default: tf-example
    resources:
      example:
        type: alicloud:resourcemanager:ResourceShare
        properties:
          resourceShareName: ${name}
    

    Create ResourceShare Resource

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

    Constructor syntax

    new ResourceShare(name: string, args: ResourceShareArgs, opts?: CustomResourceOptions);
    @overload
    def ResourceShare(resource_name: str,
                      args: ResourceShareArgs,
                      opts: Optional[ResourceOptions] = None)
    
    @overload
    def ResourceShare(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      resource_share_name: Optional[str] = None)
    func NewResourceShare(ctx *Context, name string, args ResourceShareArgs, opts ...ResourceOption) (*ResourceShare, error)
    public ResourceShare(string name, ResourceShareArgs args, CustomResourceOptions? opts = null)
    public ResourceShare(String name, ResourceShareArgs args)
    public ResourceShare(String name, ResourceShareArgs args, CustomResourceOptions options)
    
    type: alicloud:resourcemanager:ResourceShare
    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 ResourceShareArgs
    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 ResourceShareArgs
    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 ResourceShareArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourceShareArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourceShareArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var resourceShareResource = new AliCloud.ResourceManager.ResourceShare("resourceShareResource", new()
    {
        ResourceShareName = "string",
    });
    
    example, err := resourcemanager.NewResourceShare(ctx, "resourceShareResource", &resourcemanager.ResourceShareArgs{
    	ResourceShareName: pulumi.String("string"),
    })
    
    var resourceShareResource = new ResourceShare("resourceShareResource", ResourceShareArgs.builder()        
        .resourceShareName("string")
        .build());
    
    resource_share_resource = alicloud.resourcemanager.ResourceShare("resourceShareResource", resource_share_name="string")
    
    const resourceShareResource = new alicloud.resourcemanager.ResourceShare("resourceShareResource", {resourceShareName: "string"});
    
    type: alicloud:resourcemanager:ResourceShare
    properties:
        resourceShareName: string
    

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

    ResourceShareName string
    The name of resource share.
    ResourceShareName string
    The name of resource share.
    resourceShareName String
    The name of resource share.
    resourceShareName string
    The name of resource share.
    resource_share_name str
    The name of resource share.
    resourceShareName String
    The name of resource share.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceShareOwner string
    The owner of the Resource Share.
    Status string
    The status of the Resource Share.
    Id string
    The provider-assigned unique ID for this managed resource.
    ResourceShareOwner string
    The owner of the Resource Share.
    Status string
    The status of the Resource Share.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceShareOwner String
    The owner of the Resource Share.
    status String
    The status of the Resource Share.
    id string
    The provider-assigned unique ID for this managed resource.
    resourceShareOwner string
    The owner of the Resource Share.
    status string
    The status of the Resource Share.
    id str
    The provider-assigned unique ID for this managed resource.
    resource_share_owner str
    The owner of the Resource Share.
    status str
    The status of the Resource Share.
    id String
    The provider-assigned unique ID for this managed resource.
    resourceShareOwner String
    The owner of the Resource Share.
    status String
    The status of the Resource Share.

    Look up Existing ResourceShare Resource

    Get an existing ResourceShare 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?: ResourceShareState, opts?: CustomResourceOptions): ResourceShare
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            resource_share_name: Optional[str] = None,
            resource_share_owner: Optional[str] = None,
            status: Optional[str] = None) -> ResourceShare
    func GetResourceShare(ctx *Context, name string, id IDInput, state *ResourceShareState, opts ...ResourceOption) (*ResourceShare, error)
    public static ResourceShare Get(string name, Input<string> id, ResourceShareState? state, CustomResourceOptions? opts = null)
    public static ResourceShare get(String name, Output<String> id, ResourceShareState 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:
    ResourceShareName string
    The name of resource share.
    ResourceShareOwner string
    The owner of the Resource Share.
    Status string
    The status of the Resource Share.
    ResourceShareName string
    The name of resource share.
    ResourceShareOwner string
    The owner of the Resource Share.
    Status string
    The status of the Resource Share.
    resourceShareName String
    The name of resource share.
    resourceShareOwner String
    The owner of the Resource Share.
    status String
    The status of the Resource Share.
    resourceShareName string
    The name of resource share.
    resourceShareOwner string
    The owner of the Resource Share.
    status string
    The status of the Resource Share.
    resource_share_name str
    The name of resource share.
    resource_share_owner str
    The owner of the Resource Share.
    status str
    The status of the Resource Share.
    resourceShareName String
    The name of resource share.
    resourceShareOwner String
    The owner of the Resource Share.
    status String
    The status of the Resource Share.

    Import

    Resource Manager Resource Share can be imported using the id, e.g.

    $ pulumi import alicloud:resourcemanager/resourceShare:ResourceShare example <id>
    

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

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi