1. Packages
  2. Alibaba Cloud Provider
  3. API Docs
  4. dataworks
  5. DataSourceSharedRule
Alibaba Cloud v3.73.0 published on Wednesday, Jan 15, 2025 by Pulumi

alicloud.dataworks.DataSourceSharedRule

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.73.0 published on Wednesday, Jan 15, 2025 by Pulumi

    Provides a Data Works Data Source Shared Rule resource.

    Data source sharing rule, which expresses A data source, from space A to space B (A user).

    For information about Data Works Data Source Shared Rule and how to use it, see What is Data Source Shared Rule.

    NOTE: Available since v1.237.0.

    Create DataSourceSharedRule Resource

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

    Constructor syntax

    new DataSourceSharedRule(name: string, args: DataSourceSharedRuleArgs, opts?: CustomResourceOptions);
    @overload
    def DataSourceSharedRule(resource_name: str,
                             args: DataSourceSharedRuleArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def DataSourceSharedRule(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             data_source_id: Optional[int] = None,
                             env_type: Optional[str] = None,
                             target_project_id: Optional[int] = None,
                             shared_user: Optional[str] = None)
    func NewDataSourceSharedRule(ctx *Context, name string, args DataSourceSharedRuleArgs, opts ...ResourceOption) (*DataSourceSharedRule, error)
    public DataSourceSharedRule(string name, DataSourceSharedRuleArgs args, CustomResourceOptions? opts = null)
    public DataSourceSharedRule(String name, DataSourceSharedRuleArgs args)
    public DataSourceSharedRule(String name, DataSourceSharedRuleArgs args, CustomResourceOptions options)
    
    type: alicloud:dataworks:DataSourceSharedRule
    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 DataSourceSharedRuleArgs
    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 DataSourceSharedRuleArgs
    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 DataSourceSharedRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DataSourceSharedRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DataSourceSharedRuleArgs
    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 dataSourceSharedRuleResource = new AliCloud.DataWorks.DataSourceSharedRule("dataSourceSharedRuleResource", new()
    {
        DataSourceId = 0,
        EnvType = "string",
        TargetProjectId = 0,
        SharedUser = "string",
    });
    
    example, err := dataworks.NewDataSourceSharedRule(ctx, "dataSourceSharedRuleResource", &dataworks.DataSourceSharedRuleArgs{
    	DataSourceId:    pulumi.Int(0),
    	EnvType:         pulumi.String("string"),
    	TargetProjectId: pulumi.Int(0),
    	SharedUser:      pulumi.String("string"),
    })
    
    var dataSourceSharedRuleResource = new DataSourceSharedRule("dataSourceSharedRuleResource", DataSourceSharedRuleArgs.builder()
        .dataSourceId(0)
        .envType("string")
        .targetProjectId(0)
        .sharedUser("string")
        .build());
    
    data_source_shared_rule_resource = alicloud.dataworks.DataSourceSharedRule("dataSourceSharedRuleResource",
        data_source_id=0,
        env_type="string",
        target_project_id=0,
        shared_user="string")
    
    const dataSourceSharedRuleResource = new alicloud.dataworks.DataSourceSharedRule("dataSourceSharedRuleResource", {
        dataSourceId: 0,
        envType: "string",
        targetProjectId: 0,
        sharedUser: "string",
    });
    
    type: alicloud:dataworks:DataSourceSharedRule
    properties:
        dataSourceId: 0
        envType: string
        sharedUser: string
        targetProjectId: 0
    

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

    DataSourceId int
    The ID of the data source, that is, the unique identifier of the data source.
    EnvType string
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    TargetProjectId int
    The ID of the project to which the data source is shared.
    SharedUser string
    The target user of the data source permission policy, which is null to share to the project.
    DataSourceId int
    The ID of the data source, that is, the unique identifier of the data source.
    EnvType string
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    TargetProjectId int
    The ID of the project to which the data source is shared.
    SharedUser string
    The target user of the data source permission policy, which is null to share to the project.
    dataSourceId Integer
    The ID of the data source, that is, the unique identifier of the data source.
    envType String
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    targetProjectId Integer
    The ID of the project to which the data source is shared.
    sharedUser String
    The target user of the data source permission policy, which is null to share to the project.
    dataSourceId number
    The ID of the data source, that is, the unique identifier of the data source.
    envType string
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    targetProjectId number
    The ID of the project to which the data source is shared.
    sharedUser string
    The target user of the data source permission policy, which is null to share to the project.
    data_source_id int
    The ID of the data source, that is, the unique identifier of the data source.
    env_type str
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    target_project_id int
    The ID of the project to which the data source is shared.
    shared_user str
    The target user of the data source permission policy, which is null to share to the project.
    dataSourceId Number
    The ID of the data source, that is, the unique identifier of the data source.
    envType String
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    targetProjectId Number
    The ID of the project to which the data source is shared.
    sharedUser String
    The target user of the data source permission policy, which is null to share to the project.

    Outputs

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

    CreateTime int
    The creation time of the data source sharing rule.
    DataSourceSharedRuleId string
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    CreateTime int
    The creation time of the data source sharing rule.
    DataSourceSharedRuleId string
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    Id string
    The provider-assigned unique ID for this managed resource.
    createTime Integer
    The creation time of the data source sharing rule.
    dataSourceSharedRuleId String
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    id String
    The provider-assigned unique ID for this managed resource.
    createTime number
    The creation time of the data source sharing rule.
    dataSourceSharedRuleId string
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    id string
    The provider-assigned unique ID for this managed resource.
    create_time int
    The creation time of the data source sharing rule.
    data_source_shared_rule_id str
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    id str
    The provider-assigned unique ID for this managed resource.
    createTime Number
    The creation time of the data source sharing rule.
    dataSourceSharedRuleId String
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing DataSourceSharedRule Resource

    Get an existing DataSourceSharedRule 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?: DataSourceSharedRuleState, opts?: CustomResourceOptions): DataSourceSharedRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[int] = None,
            data_source_id: Optional[int] = None,
            data_source_shared_rule_id: Optional[str] = None,
            env_type: Optional[str] = None,
            shared_user: Optional[str] = None,
            target_project_id: Optional[int] = None) -> DataSourceSharedRule
    func GetDataSourceSharedRule(ctx *Context, name string, id IDInput, state *DataSourceSharedRuleState, opts ...ResourceOption) (*DataSourceSharedRule, error)
    public static DataSourceSharedRule Get(string name, Input<string> id, DataSourceSharedRuleState? state, CustomResourceOptions? opts = null)
    public static DataSourceSharedRule get(String name, Output<String> id, DataSourceSharedRuleState state, CustomResourceOptions options)
    resources:  _:    type: alicloud:dataworks:DataSourceSharedRule    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.
    The following state arguments are supported:
    CreateTime int
    The creation time of the data source sharing rule.
    DataSourceId int
    The ID of the data source, that is, the unique identifier of the data source.
    DataSourceSharedRuleId string
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    EnvType string
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    SharedUser string
    The target user of the data source permission policy, which is null to share to the project.
    TargetProjectId int
    The ID of the project to which the data source is shared.
    CreateTime int
    The creation time of the data source sharing rule.
    DataSourceId int
    The ID of the data source, that is, the unique identifier of the data source.
    DataSourceSharedRuleId string
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    EnvType string
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    SharedUser string
    The target user of the data source permission policy, which is null to share to the project.
    TargetProjectId int
    The ID of the project to which the data source is shared.
    createTime Integer
    The creation time of the data source sharing rule.
    dataSourceId Integer
    The ID of the data source, that is, the unique identifier of the data source.
    dataSourceSharedRuleId String
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    envType String
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    sharedUser String
    The target user of the data source permission policy, which is null to share to the project.
    targetProjectId Integer
    The ID of the project to which the data source is shared.
    createTime number
    The creation time of the data source sharing rule.
    dataSourceId number
    The ID of the data source, that is, the unique identifier of the data source.
    dataSourceSharedRuleId string
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    envType string
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    sharedUser string
    The target user of the data source permission policy, which is null to share to the project.
    targetProjectId number
    The ID of the project to which the data source is shared.
    create_time int
    The creation time of the data source sharing rule.
    data_source_id int
    The ID of the data source, that is, the unique identifier of the data source.
    data_source_shared_rule_id str
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    env_type str
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    shared_user str
    The target user of the data source permission policy, which is null to share to the project.
    target_project_id int
    The ID of the project to which the data source is shared.
    createTime Number
    The creation time of the data source sharing rule.
    dataSourceId Number
    The ID of the data source, that is, the unique identifier of the data source.
    dataSourceSharedRuleId String
    The data source sharing rule ID, that is, the unique identifier of the data source sharing rule.
    envType String
    The environment type of the data source shared to the target project, such as Dev (Development Environment) and Prod (production environment).
    sharedUser String
    The target user of the data source permission policy, which is null to share to the project.
    targetProjectId Number
    The ID of the project to which the data source is shared.

    Import

    Data Works Data Source Shared Rule can be imported using the id, e.g.

    $ pulumi import alicloud:dataworks/dataSourceSharedRule:DataSourceSharedRule example <data_source_id>:<data_source_shared_rule_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.73.0 published on Wednesday, Jan 15, 2025 by Pulumi