1. Packages
  2. Grafana Cloud
  3. API Docs
  4. DataSourcePermission
Grafana v0.4.2 published on Monday, Apr 15, 2024 by pulumiverse

grafana.DataSourcePermission

Explore with Pulumi AI

grafana logo
Grafana v0.4.2 published on Monday, Apr 15, 2024 by pulumiverse

    Create DataSourcePermission Resource

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

    Constructor syntax

    new DataSourcePermission(name: string, args: DataSourcePermissionArgs, opts?: CustomResourceOptions);
    @overload
    def DataSourcePermission(resource_name: str,
                             args: DataSourcePermissionArgs,
                             opts: Optional[ResourceOptions] = None)
    
    @overload
    def DataSourcePermission(resource_name: str,
                             opts: Optional[ResourceOptions] = None,
                             datasource_id: Optional[str] = None,
                             org_id: Optional[str] = None,
                             permissions: Optional[Sequence[DataSourcePermissionPermissionArgs]] = None)
    func NewDataSourcePermission(ctx *Context, name string, args DataSourcePermissionArgs, opts ...ResourceOption) (*DataSourcePermission, error)
    public DataSourcePermission(string name, DataSourcePermissionArgs args, CustomResourceOptions? opts = null)
    public DataSourcePermission(String name, DataSourcePermissionArgs args)
    public DataSourcePermission(String name, DataSourcePermissionArgs args, CustomResourceOptions options)
    
    type: grafana:DataSourcePermission
    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 DataSourcePermissionArgs
    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 DataSourcePermissionArgs
    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 DataSourcePermissionArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DataSourcePermissionArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DataSourcePermissionArgs
    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 dataSourcePermissionResource = new Grafana.DataSourcePermission("dataSourcePermissionResource", new()
    {
        DatasourceId = "string",
        OrgId = "string",
        Permissions = new[]
        {
            new Grafana.Inputs.DataSourcePermissionPermissionArgs
            {
                Permission = "string",
                BuiltInRole = "string",
                TeamId = "string",
                UserId = "string",
            },
        },
    });
    
    example, err := grafana.NewDataSourcePermission(ctx, "dataSourcePermissionResource", &grafana.DataSourcePermissionArgs{
    	DatasourceId: pulumi.String("string"),
    	OrgId:        pulumi.String("string"),
    	Permissions: grafana.DataSourcePermissionPermissionArray{
    		&grafana.DataSourcePermissionPermissionArgs{
    			Permission:  pulumi.String("string"),
    			BuiltInRole: pulumi.String("string"),
    			TeamId:      pulumi.String("string"),
    			UserId:      pulumi.String("string"),
    		},
    	},
    })
    
    var dataSourcePermissionResource = new DataSourcePermission("dataSourcePermissionResource", DataSourcePermissionArgs.builder()        
        .datasourceId("string")
        .orgId("string")
        .permissions(DataSourcePermissionPermissionArgs.builder()
            .permission("string")
            .builtInRole("string")
            .teamId("string")
            .userId("string")
            .build())
        .build());
    
    data_source_permission_resource = grafana.DataSourcePermission("dataSourcePermissionResource",
        datasource_id="string",
        org_id="string",
        permissions=[grafana.DataSourcePermissionPermissionArgs(
            permission="string",
            built_in_role="string",
            team_id="string",
            user_id="string",
        )])
    
    const dataSourcePermissionResource = new grafana.DataSourcePermission("dataSourcePermissionResource", {
        datasourceId: "string",
        orgId: "string",
        permissions: [{
            permission: "string",
            builtInRole: "string",
            teamId: "string",
            userId: "string",
        }],
    });
    
    type: grafana:DataSourcePermission
    properties:
        datasourceId: string
        orgId: string
        permissions:
            - builtInRole: string
              permission: string
              teamId: string
              userId: string
    

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

    DatasourceId string
    ID of the datasource to apply permissions to.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Permissions List<Pulumiverse.Grafana.Inputs.DataSourcePermissionPermission>
    The permission items to add/update. Items that are omitted from the list will be removed.
    DatasourceId string
    ID of the datasource to apply permissions to.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Permissions []DataSourcePermissionPermissionArgs
    The permission items to add/update. Items that are omitted from the list will be removed.
    datasourceId String
    ID of the datasource to apply permissions to.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    permissions List<DataSourcePermissionPermission>
    The permission items to add/update. Items that are omitted from the list will be removed.
    datasourceId string
    ID of the datasource to apply permissions to.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    permissions DataSourcePermissionPermission[]
    The permission items to add/update. Items that are omitted from the list will be removed.
    datasource_id str
    ID of the datasource to apply permissions to.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    permissions Sequence[DataSourcePermissionPermissionArgs]
    The permission items to add/update. Items that are omitted from the list will be removed.
    datasourceId String
    ID of the datasource to apply permissions to.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    permissions List<Property Map>
    The permission items to add/update. Items that are omitted from the list will be removed.

    Outputs

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

    Get an existing DataSourcePermission 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?: DataSourcePermissionState, opts?: CustomResourceOptions): DataSourcePermission
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            datasource_id: Optional[str] = None,
            org_id: Optional[str] = None,
            permissions: Optional[Sequence[DataSourcePermissionPermissionArgs]] = None) -> DataSourcePermission
    func GetDataSourcePermission(ctx *Context, name string, id IDInput, state *DataSourcePermissionState, opts ...ResourceOption) (*DataSourcePermission, error)
    public static DataSourcePermission Get(string name, Input<string> id, DataSourcePermissionState? state, CustomResourceOptions? opts = null)
    public static DataSourcePermission get(String name, Output<String> id, DataSourcePermissionState 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:
    DatasourceId string
    ID of the datasource to apply permissions to.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Permissions List<Pulumiverse.Grafana.Inputs.DataSourcePermissionPermission>
    The permission items to add/update. Items that are omitted from the list will be removed.
    DatasourceId string
    ID of the datasource to apply permissions to.
    OrgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    Permissions []DataSourcePermissionPermissionArgs
    The permission items to add/update. Items that are omitted from the list will be removed.
    datasourceId String
    ID of the datasource to apply permissions to.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    permissions List<DataSourcePermissionPermission>
    The permission items to add/update. Items that are omitted from the list will be removed.
    datasourceId string
    ID of the datasource to apply permissions to.
    orgId string
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    permissions DataSourcePermissionPermission[]
    The permission items to add/update. Items that are omitted from the list will be removed.
    datasource_id str
    ID of the datasource to apply permissions to.
    org_id str
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    permissions Sequence[DataSourcePermissionPermissionArgs]
    The permission items to add/update. Items that are omitted from the list will be removed.
    datasourceId String
    ID of the datasource to apply permissions to.
    orgId String
    The Organization ID. If not set, the Org ID defined in the provider block will be used.
    permissions List<Property Map>
    The permission items to add/update. Items that are omitted from the list will be removed.

    Supporting Types

    DataSourcePermissionPermission, DataSourcePermissionPermissionArgs

    Permission string
    Permission to associate with item. Options: Query, Edit or Admin (Admin can only be used with Grafana v10.3.0+).
    BuiltInRole string
    Name of the basic role to manage permissions for. Options: Viewer, Editor or Admin. Can only be set from Grafana v9.2.3+.
    TeamId string
    ID of the team to manage permissions for.
    UserId string
    ID of the user or service account to manage permissions for.
    Permission string
    Permission to associate with item. Options: Query, Edit or Admin (Admin can only be used with Grafana v10.3.0+).
    BuiltInRole string
    Name of the basic role to manage permissions for. Options: Viewer, Editor or Admin. Can only be set from Grafana v9.2.3+.
    TeamId string
    ID of the team to manage permissions for.
    UserId string
    ID of the user or service account to manage permissions for.
    permission String
    Permission to associate with item. Options: Query, Edit or Admin (Admin can only be used with Grafana v10.3.0+).
    builtInRole String
    Name of the basic role to manage permissions for. Options: Viewer, Editor or Admin. Can only be set from Grafana v9.2.3+.
    teamId String
    ID of the team to manage permissions for.
    userId String
    ID of the user or service account to manage permissions for.
    permission string
    Permission to associate with item. Options: Query, Edit or Admin (Admin can only be used with Grafana v10.3.0+).
    builtInRole string
    Name of the basic role to manage permissions for. Options: Viewer, Editor or Admin. Can only be set from Grafana v9.2.3+.
    teamId string
    ID of the team to manage permissions for.
    userId string
    ID of the user or service account to manage permissions for.
    permission str
    Permission to associate with item. Options: Query, Edit or Admin (Admin can only be used with Grafana v10.3.0+).
    built_in_role str
    Name of the basic role to manage permissions for. Options: Viewer, Editor or Admin. Can only be set from Grafana v9.2.3+.
    team_id str
    ID of the team to manage permissions for.
    user_id str
    ID of the user or service account to manage permissions for.
    permission String
    Permission to associate with item. Options: Query, Edit or Admin (Admin can only be used with Grafana v10.3.0+).
    builtInRole String
    Name of the basic role to manage permissions for. Options: Viewer, Editor or Admin. Can only be set from Grafana v9.2.3+.
    teamId String
    ID of the team to manage permissions for.
    userId String
    ID of the user or service account to manage permissions for.

    Package Details

    Repository
    grafana pulumiverse/pulumi-grafana
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the grafana Terraform Provider.
    grafana logo
    Grafana v0.4.2 published on Monday, Apr 15, 2024 by pulumiverse