1. Packages
  2. Dynatrace
  3. API Docs
  4. Policy
Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse

dynatrace.Policy

Explore with Pulumi AI

dynatrace logo
Dynatrace v0.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse

    Create Policy Resource

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

    Constructor syntax

    new Policy(name: string, args: PolicyArgs, opts?: CustomResourceOptions);
    @overload
    def Policy(resource_name: str,
               args: PolicyArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Policy(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               statement_query: Optional[str] = None,
               cluster: Optional[str] = None,
               description: Optional[str] = None,
               environment: Optional[str] = None,
               name: Optional[str] = None,
               tags: Optional[Sequence[str]] = None)
    func NewPolicy(ctx *Context, name string, args PolicyArgs, opts ...ResourceOption) (*Policy, error)
    public Policy(string name, PolicyArgs args, CustomResourceOptions? opts = null)
    public Policy(String name, PolicyArgs args)
    public Policy(String name, PolicyArgs args, CustomResourceOptions options)
    
    type: dynatrace:Policy
    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 PolicyArgs
    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 PolicyArgs
    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 PolicyArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PolicyArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PolicyArgs
    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 policyResource = new Dynatrace.Policy("policyResource", new()
    {
        StatementQuery = "string",
        Cluster = "string",
        Description = "string",
        Environment = "string",
        Name = "string",
        Tags = new[]
        {
            "string",
        },
    });
    
    example, err := dynatrace.NewPolicy(ctx, "policyResource", &dynatrace.PolicyArgs{
    	StatementQuery: pulumi.String("string"),
    	Cluster:        pulumi.String("string"),
    	Description:    pulumi.String("string"),
    	Environment:    pulumi.String("string"),
    	Name:           pulumi.String("string"),
    	Tags: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var policyResource = new Policy("policyResource", PolicyArgs.builder()
        .statementQuery("string")
        .cluster("string")
        .description("string")
        .environment("string")
        .name("string")
        .tags("string")
        .build());
    
    policy_resource = dynatrace.Policy("policyResource",
        statement_query="string",
        cluster="string",
        description="string",
        environment="string",
        name="string",
        tags=["string"])
    
    const policyResource = new dynatrace.Policy("policyResource", {
        statementQuery: "string",
        cluster: "string",
        description: "string",
        environment: "string",
        name: "string",
        tags: ["string"],
    });
    
    type: dynatrace:Policy
    properties:
        cluster: string
        description: string
        environment: string
        name: string
        statementQuery: string
        tags:
            - string
    

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

    StatementQuery string
    The Statement Query of the policy
    Cluster string
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    Description string
    An optional description text for the policy
    Environment string
    The ID of the environment if the policy should be applied to a specific environment
    Name string
    The name of the policy
    Tags List<string>
    Tags for this policy
    StatementQuery string
    The Statement Query of the policy
    Cluster string
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    Description string
    An optional description text for the policy
    Environment string
    The ID of the environment if the policy should be applied to a specific environment
    Name string
    The name of the policy
    Tags []string
    Tags for this policy
    statementQuery String
    The Statement Query of the policy
    cluster String
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    description String
    An optional description text for the policy
    environment String
    The ID of the environment if the policy should be applied to a specific environment
    name String
    The name of the policy
    tags List<String>
    Tags for this policy
    statementQuery string
    The Statement Query of the policy
    cluster string
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    description string
    An optional description text for the policy
    environment string
    The ID of the environment if the policy should be applied to a specific environment
    name string
    The name of the policy
    tags string[]
    Tags for this policy
    statement_query str
    The Statement Query of the policy
    cluster str
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    description str
    An optional description text for the policy
    environment str
    The ID of the environment if the policy should be applied to a specific environment
    name str
    The name of the policy
    tags Sequence[str]
    Tags for this policy
    statementQuery String
    The Statement Query of the policy
    cluster String
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    description String
    An optional description text for the policy
    environment String
    The ID of the environment if the policy should be applied to a specific environment
    name String
    The name of the policy
    tags List<String>
    Tags for this policy

    Outputs

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

    Get an existing Policy 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?: PolicyState, opts?: CustomResourceOptions): Policy
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            cluster: Optional[str] = None,
            description: Optional[str] = None,
            environment: Optional[str] = None,
            name: Optional[str] = None,
            statement_query: Optional[str] = None,
            tags: Optional[Sequence[str]] = None) -> Policy
    func GetPolicy(ctx *Context, name string, id IDInput, state *PolicyState, opts ...ResourceOption) (*Policy, error)
    public static Policy Get(string name, Input<string> id, PolicyState? state, CustomResourceOptions? opts = null)
    public static Policy get(String name, Output<String> id, PolicyState 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:
    Cluster string
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    Description string
    An optional description text for the policy
    Environment string
    The ID of the environment if the policy should be applied to a specific environment
    Name string
    The name of the policy
    StatementQuery string
    The Statement Query of the policy
    Tags List<string>
    Tags for this policy
    Cluster string
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    Description string
    An optional description text for the policy
    Environment string
    The ID of the environment if the policy should be applied to a specific environment
    Name string
    The name of the policy
    StatementQuery string
    The Statement Query of the policy
    Tags []string
    Tags for this policy
    cluster String
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    description String
    An optional description text for the policy
    environment String
    The ID of the environment if the policy should be applied to a specific environment
    name String
    The name of the policy
    statementQuery String
    The Statement Query of the policy
    tags List<String>
    Tags for this policy
    cluster string
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    description string
    An optional description text for the policy
    environment string
    The ID of the environment if the policy should be applied to a specific environment
    name string
    The name of the policy
    statementQuery string
    The Statement Query of the policy
    tags string[]
    Tags for this policy
    cluster str
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    description str
    An optional description text for the policy
    environment str
    The ID of the environment if the policy should be applied to a specific environment
    name str
    The name of the policy
    statement_query str
    The Statement Query of the policy
    tags Sequence[str]
    Tags for this policy
    cluster String
    The UUID of the cluster in case the policy should be applied to all environments of this cluster.
    description String
    An optional description text for the policy
    environment String
    The ID of the environment if the policy should be applied to a specific environment
    name String
    The name of the policy
    statementQuery String
    The Statement Query of the policy
    tags List<String>
    Tags for this policy

    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.21.0 published on Sunday, Nov 17, 2024 by Pulumiverse