1. Packages
  2. Packages
  3. Alibaba Cloud Provider
  4. API Docs
  5. resourcemanager
  6. ResourceDirectorySharing
Viewing docs for Alibaba Cloud v3.105.0
published on Thursday, Jul 16, 2026 by Pulumi
alicloud logo
Viewing docs for Alibaba Cloud v3.105.0
published on Thursday, Jul 16, 2026 by Pulumi

    Provides a Resource Manager Resource Directory Sharing resource.

    Resource directory sharing, which enables sharing with the resource directory.

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

    NOTE: Available since v1.283.0.

    NOTE: Sharing with the resource directory is an account-level capability. Once enabled, the underlying service API does not provide a way to disable it, so this resource cannot be torn down.

    Example Usage

    Basic Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const _default = new alicloud.resourcemanager.ResourceDirectorySharing("default", {});
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    default = alicloud.resourcemanager.ResourceDirectorySharing("default")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/resourcemanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := resourcemanager.NewResourceDirectorySharing(ctx, "default", nil)
    		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 @default = new AliCloud.ResourceManager.ResourceDirectorySharing("default");
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.alicloud.resourcemanager.ResourceDirectorySharing;
    import java.util.ArrayList;
    import java.util.Arrays;
    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 default_ = new ResourceDirectorySharing("default");
    
        }
    }
    
    resources:
      default:
        type: alicloud:resourcemanager:ResourceDirectorySharing
    
    pulumi {
      required_providers {
        alicloud = {
          source = "pulumi/alicloud"
        }
      }
    }
    
    resource "alicloud_resourcemanager_resourcedirectorysharing" "default" {
    }
    

    Deleting alicloud.resourcemanager.ResourceDirectorySharing or removing it from your configuration

    Sharing with the resource directory is enabled at the Alibaba Cloud account level, and once enabled it cannot be disabled through the underlying API. Terraform cannot destroy resource alicloud.resourcemanager.ResourceDirectorySharing: removing it from your configuration only removes it from the Terraform state file, and the feature will remain enabled on the account.

    📚 Need more examples? VIEW MORE EXAMPLES

    Create ResourceDirectorySharing Resource

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

    Constructor syntax

    new ResourceDirectorySharing(name: string, args?: ResourceDirectorySharingArgs, opts?: CustomResourceOptions);
    @overload
    def ResourceDirectorySharing(resource_name: str,
                                 args: Optional[ResourceDirectorySharingArgs] = None,
                                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def ResourceDirectorySharing(resource_name: str,
                                 opts: Optional[ResourceOptions] = None)
    func NewResourceDirectorySharing(ctx *Context, name string, args *ResourceDirectorySharingArgs, opts ...ResourceOption) (*ResourceDirectorySharing, error)
    public ResourceDirectorySharing(string name, ResourceDirectorySharingArgs? args = null, CustomResourceOptions? opts = null)
    public ResourceDirectorySharing(String name, ResourceDirectorySharingArgs args)
    public ResourceDirectorySharing(String name, ResourceDirectorySharingArgs args, CustomResourceOptions options)
    
    type: alicloud:resourcemanager:ResourceDirectorySharing
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "alicloud_resourcemanager_resource_directory_sharing" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args ResourceDirectorySharingArgs
    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 ResourceDirectorySharingArgs
    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 ResourceDirectorySharingArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ResourceDirectorySharingArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ResourceDirectorySharingArgs
    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 resourceDirectorySharingResource = new AliCloud.ResourceManager.ResourceDirectorySharing("resourceDirectorySharingResource");
    
    example, err := resourcemanager.NewResourceDirectorySharing(ctx, "resourceDirectorySharingResource", nil)
    
    resource "alicloud_resourcemanager_resource_directory_sharing" "resourceDirectorySharingResource" {
      lifecycle {
        create_before_destroy = true
      }
    }
    
    var resourceDirectorySharingResource = new ResourceDirectorySharing("resourceDirectorySharingResource");
    
    resource_directory_sharing_resource = alicloud.resourcemanager.ResourceDirectorySharing("resourceDirectorySharingResource")
    
    const resourceDirectorySharingResource = new alicloud.resourcemanager.ResourceDirectorySharing("resourceDirectorySharingResource", {});
    
    type: alicloud:resourcemanager:ResourceDirectorySharing
    properties: {}
    

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

    Outputs

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

    EnableSharingWithRd bool
    Indicates whether sharing with the resource directory is enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    EnableSharingWithRd bool
    Indicates whether sharing with the resource directory is enabled.
    Id string
    The provider-assigned unique ID for this managed resource.
    enable_sharing_with_rd bool
    Indicates whether sharing with the resource directory is enabled.
    id string
    The provider-assigned unique ID for this managed resource.
    enableSharingWithRd Boolean
    Indicates whether sharing with the resource directory is enabled.
    id String
    The provider-assigned unique ID for this managed resource.
    enableSharingWithRd boolean
    Indicates whether sharing with the resource directory is enabled.
    id string
    The provider-assigned unique ID for this managed resource.
    enable_sharing_with_rd bool
    Indicates whether sharing with the resource directory is enabled.
    id str
    The provider-assigned unique ID for this managed resource.
    enableSharingWithRd Boolean
    Indicates whether sharing with the resource directory is enabled.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ResourceDirectorySharing Resource

    Get an existing ResourceDirectorySharing 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?: ResourceDirectorySharingState, opts?: CustomResourceOptions): ResourceDirectorySharing
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            enable_sharing_with_rd: Optional[bool] = None) -> ResourceDirectorySharing
    func GetResourceDirectorySharing(ctx *Context, name string, id IDInput, state *ResourceDirectorySharingState, opts ...ResourceOption) (*ResourceDirectorySharing, error)
    public static ResourceDirectorySharing Get(string name, Input<string> id, ResourceDirectorySharingState? state, CustomResourceOptions? opts = null)
    public static ResourceDirectorySharing get(String name, Output<String> id, ResourceDirectorySharingState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:resourcemanager:ResourceDirectorySharing    get:      id: ${id}
    import {
      to = alicloud_resourcemanager_resource_directory_sharing.example
      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.
    The following state arguments are supported:
    EnableSharingWithRd bool
    Indicates whether sharing with the resource directory is enabled.
    EnableSharingWithRd bool
    Indicates whether sharing with the resource directory is enabled.
    enable_sharing_with_rd bool
    Indicates whether sharing with the resource directory is enabled.
    enableSharingWithRd Boolean
    Indicates whether sharing with the resource directory is enabled.
    enableSharingWithRd boolean
    Indicates whether sharing with the resource directory is enabled.
    enable_sharing_with_rd bool
    Indicates whether sharing with the resource directory is enabled.
    enableSharingWithRd Boolean
    Indicates whether sharing with the resource directory is enabled.

    Import

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

    $ terraform import alicloud_resource_manager_resource_directory_sharing.example <Alibaba Cloud Account 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
    Viewing docs for Alibaba Cloud v3.105.0
    published on Thursday, Jul 16, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial