1. Packages
  2. Dynatrace
  3. API Docs
  4. DirectShares
Dynatrace v0.10.0 published on Friday, Jun 7, 2024 by Pulumiverse

dynatrace.DirectShares

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.10.0 published on Friday, Jun 7, 2024 by Pulumiverse

    This resource is currently not covered by the export utility.

    Dynatrace Documentation

    • Dynatrace Documents - https://########.apps.dynatrace.com/platform/swagger-ui/index.html?urls.primaryName=Document%20Service

    Prerequisites

    Using this resource requires an OAuth client to be configured within your account settings. The scopes of the OAuth Client need to include Read direct-shares (document:direct-shares:read), Write direct-shares (document:direct-shares:write), Delete direct-shares (document:direct-shares:delete).

    Finally the provider configuration requires the credentials for that OAuth Client. The configuration section of your provider needs to look like this.

    import * as pulumi from "@pulumi/pulumi";
    
    import pulumi
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    
    return await Deployment.RunAsync(() => 
    {
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    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) {
        }
    }
    
    {}
    

    In order to handle credentials in a secure manner we recommend to use the environment variables DYNATRACE_AUTOMATION_CLIENT_ID and DYNATRACE_AUTOMATION_CLIENT_SECRET as an alternative.

    Resource Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as dynatrace from "@pulumiverse/dynatrace";
    
    const _this = new dynatrace.DirectShares("this", {
        access: "read-write",
        documentId: "441564f0-23c9-40ef-b344-18c02c23d712",
        recipients: {
            recipients: [
                {
                    id: "441664f0-23c9-40ef-b344-18c02c23d787",
                    type: "user",
                },
                {
                    id: "441664f0-23c9-40ef-b344-18c02c23d788",
                    type: "group",
                },
            ],
        },
    });
    
    import pulumi
    import pulumiverse_dynatrace as dynatrace
    
    this = dynatrace.DirectShares("this",
        access="read-write",
        document_id="441564f0-23c9-40ef-b344-18c02c23d712",
        recipients=dynatrace.DirectSharesRecipientsArgs(
            recipients=[
                dynatrace.DirectSharesRecipientsRecipientArgs(
                    id="441664f0-23c9-40ef-b344-18c02c23d787",
                    type="user",
                ),
                dynatrace.DirectSharesRecipientsRecipientArgs(
                    id="441664f0-23c9-40ef-b344-18c02c23d788",
                    type="group",
                ),
            ],
        ))
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumiverse/pulumi-dynatrace/sdk/go/dynatrace"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := dynatrace.NewDirectShares(ctx, "this", &dynatrace.DirectSharesArgs{
    			Access:     pulumi.String("read-write"),
    			DocumentId: pulumi.String("441564f0-23c9-40ef-b344-18c02c23d712"),
    			Recipients: &dynatrace.DirectSharesRecipientsArgs{
    				Recipients: dynatrace.DirectSharesRecipientsRecipientArray{
    					&dynatrace.DirectSharesRecipientsRecipientArgs{
    						Id:   pulumi.String("441664f0-23c9-40ef-b344-18c02c23d787"),
    						Type: pulumi.String("user"),
    					},
    					&dynatrace.DirectSharesRecipientsRecipientArgs{
    						Id:   pulumi.String("441664f0-23c9-40ef-b344-18c02c23d788"),
    						Type: pulumi.String("group"),
    					},
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Dynatrace = Pulumiverse.Dynatrace;
    
    return await Deployment.RunAsync(() => 
    {
        var @this = new Dynatrace.DirectShares("this", new()
        {
            Access = "read-write",
            DocumentId = "441564f0-23c9-40ef-b344-18c02c23d712",
            Recipients = new Dynatrace.Inputs.DirectSharesRecipientsArgs
            {
                Recipients = new[]
                {
                    new Dynatrace.Inputs.DirectSharesRecipientsRecipientArgs
                    {
                        Id = "441664f0-23c9-40ef-b344-18c02c23d787",
                        Type = "user",
                    },
                    new Dynatrace.Inputs.DirectSharesRecipientsRecipientArgs
                    {
                        Id = "441664f0-23c9-40ef-b344-18c02c23d788",
                        Type = "group",
                    },
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.dynatrace.DirectShares;
    import com.pulumi.dynatrace.DirectSharesArgs;
    import com.pulumi.dynatrace.inputs.DirectSharesRecipientsArgs;
    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 this_ = new DirectShares("this", DirectSharesArgs.builder()
                .access("read-write")
                .documentId("441564f0-23c9-40ef-b344-18c02c23d712")
                .recipients(DirectSharesRecipientsArgs.builder()
                    .recipients(                
                        DirectSharesRecipientsRecipientArgs.builder()
                            .id("441664f0-23c9-40ef-b344-18c02c23d787")
                            .type("user")
                            .build(),
                        DirectSharesRecipientsRecipientArgs.builder()
                            .id("441664f0-23c9-40ef-b344-18c02c23d788")
                            .type("group")
                            .build())
                    .build())
                .build());
    
        }
    }
    
    resources:
      this:
        type: dynatrace:DirectShares
        properties:
          access: read-write
          documentId: 441564f0-23c9-40ef-b344-18c02c23d712
          recipients:
            recipients:
              - id: 441664f0-23c9-40ef-b344-18c02c23d787
                type: user
              - id: 441664f0-23c9-40ef-b344-18c02c23d788
                type: group
    

    Create DirectShares Resource

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

    Constructor syntax

    new DirectShares(name: string, args: DirectSharesArgs, opts?: CustomResourceOptions);
    @overload
    def DirectShares(resource_name: str,
                     args: DirectSharesArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def DirectShares(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     document_id: Optional[str] = None,
                     recipients: Optional[DirectSharesRecipientsArgs] = None,
                     access: Optional[str] = None)
    func NewDirectShares(ctx *Context, name string, args DirectSharesArgs, opts ...ResourceOption) (*DirectShares, error)
    public DirectShares(string name, DirectSharesArgs args, CustomResourceOptions? opts = null)
    public DirectShares(String name, DirectSharesArgs args)
    public DirectShares(String name, DirectSharesArgs args, CustomResourceOptions options)
    
    type: dynatrace:DirectShares
    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 DirectSharesArgs
    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 DirectSharesArgs
    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 DirectSharesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args DirectSharesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args DirectSharesArgs
    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 directSharesResource = new Dynatrace.DirectShares("directSharesResource", new()
    {
        DocumentId = "string",
        Recipients = new Dynatrace.Inputs.DirectSharesRecipientsArgs
        {
            Recipients = new[]
            {
                new Dynatrace.Inputs.DirectSharesRecipientsRecipientArgs
                {
                    Id = "string",
                    Type = "string",
                },
            },
        },
        Access = "string",
    });
    
    example, err := dynatrace.NewDirectShares(ctx, "directSharesResource", &dynatrace.DirectSharesArgs{
    	DocumentId: pulumi.String("string"),
    	Recipients: &dynatrace.DirectSharesRecipientsArgs{
    		Recipients: dynatrace.DirectSharesRecipientsRecipientArray{
    			&dynatrace.DirectSharesRecipientsRecipientArgs{
    				Id:   pulumi.String("string"),
    				Type: pulumi.String("string"),
    			},
    		},
    	},
    	Access: pulumi.String("string"),
    })
    
    var directSharesResource = new DirectShares("directSharesResource", DirectSharesArgs.builder()
        .documentId("string")
        .recipients(DirectSharesRecipientsArgs.builder()
            .recipients(DirectSharesRecipientsRecipientArgs.builder()
                .id("string")
                .type("string")
                .build())
            .build())
        .access("string")
        .build());
    
    direct_shares_resource = dynatrace.DirectShares("directSharesResource",
        document_id="string",
        recipients=dynatrace.DirectSharesRecipientsArgs(
            recipients=[dynatrace.DirectSharesRecipientsRecipientArgs(
                id="string",
                type="string",
            )],
        ),
        access="string")
    
    const directSharesResource = new dynatrace.DirectShares("directSharesResource", {
        documentId: "string",
        recipients: {
            recipients: [{
                id: "string",
                type: "string",
            }],
        },
        access: "string",
    });
    
    type: dynatrace:DirectShares
    properties:
        access: string
        documentId: string
        recipients:
            recipients:
                - id: string
                  type: string
    

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

    DocumentId string
    Document ID
    Recipients Pulumiverse.Dynatrace.Inputs.DirectSharesRecipients
    Recipients of the direct share
    Access string
    Access grants. Possible values are read and read-write
    DocumentId string
    Document ID
    Recipients DirectSharesRecipientsArgs
    Recipients of the direct share
    Access string
    Access grants. Possible values are read and read-write
    documentId String
    Document ID
    recipients DirectSharesRecipients
    Recipients of the direct share
    access String
    Access grants. Possible values are read and read-write
    documentId string
    Document ID
    recipients DirectSharesRecipients
    Recipients of the direct share
    access string
    Access grants. Possible values are read and read-write
    document_id str
    Document ID
    recipients DirectSharesRecipientsArgs
    Recipients of the direct share
    access str
    Access grants. Possible values are read and read-write
    documentId String
    Document ID
    recipients Property Map
    Recipients of the direct share
    access String
    Access grants. Possible values are read and read-write

    Outputs

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

    Get an existing DirectShares 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?: DirectSharesState, opts?: CustomResourceOptions): DirectShares
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            access: Optional[str] = None,
            document_id: Optional[str] = None,
            recipients: Optional[DirectSharesRecipientsArgs] = None) -> DirectShares
    func GetDirectShares(ctx *Context, name string, id IDInput, state *DirectSharesState, opts ...ResourceOption) (*DirectShares, error)
    public static DirectShares Get(string name, Input<string> id, DirectSharesState? state, CustomResourceOptions? opts = null)
    public static DirectShares get(String name, Output<String> id, DirectSharesState 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:
    Access string
    Access grants. Possible values are read and read-write
    DocumentId string
    Document ID
    Recipients Pulumiverse.Dynatrace.Inputs.DirectSharesRecipients
    Recipients of the direct share
    Access string
    Access grants. Possible values are read and read-write
    DocumentId string
    Document ID
    Recipients DirectSharesRecipientsArgs
    Recipients of the direct share
    access String
    Access grants. Possible values are read and read-write
    documentId String
    Document ID
    recipients DirectSharesRecipients
    Recipients of the direct share
    access string
    Access grants. Possible values are read and read-write
    documentId string
    Document ID
    recipients DirectSharesRecipients
    Recipients of the direct share
    access str
    Access grants. Possible values are read and read-write
    document_id str
    Document ID
    recipients DirectSharesRecipientsArgs
    Recipients of the direct share
    access String
    Access grants. Possible values are read and read-write
    documentId String
    Document ID
    recipients Property Map
    Recipients of the direct share

    Supporting Types

    DirectSharesRecipients, DirectSharesRecipientsArgs

    Recipients []DirectSharesRecipientsRecipient
    Recipient of the direct share
    recipients DirectSharesRecipientsRecipient[]
    Recipient of the direct share
    recipients List<Property Map>
    Recipient of the direct share

    DirectSharesRecipientsRecipient, DirectSharesRecipientsRecipientArgs

    Id string
    Identifier of the recipient
    Type string
    Type of the recipient. Possible values are group' anduser'
    Id string
    Identifier of the recipient
    Type string
    Type of the recipient. Possible values are group' anduser'
    id String
    Identifier of the recipient
    type String
    Type of the recipient. Possible values are group' anduser'
    id string
    Identifier of the recipient
    type string
    Type of the recipient. Possible values are group' anduser'
    id str
    Identifier of the recipient
    type str
    Type of the recipient. Possible values are group' anduser'
    id String
    Identifier of the recipient
    type String
    Type of the recipient. Possible values are group' anduser'

    Package Details

    Repository
    dynatrace pulumiverse/pulumi-dynatrace
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the dynatrace Terraform Provider.
    dynatrace logo
    Dynatrace v0.10.0 published on Friday, Jun 7, 2024 by Pulumiverse