1. Packages
  2. Opsgenie
  3. API Docs
  4. Maintenance
Opsgenie v1.3.8 published on Monday, Jun 24, 2024 by Pulumi

opsgenie.Maintenance

Explore with Pulumi AI

opsgenie logo
Opsgenie v1.3.8 published on Monday, Jun 24, 2024 by Pulumi

    Manages a Maintenance within Opsgenie.

    Create Maintenance Resource

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

    Constructor syntax

    new Maintenance(name: string, args: MaintenanceArgs, opts?: CustomResourceOptions);
    @overload
    def Maintenance(resource_name: str,
                    args: MaintenanceArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Maintenance(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    description: Optional[str] = None,
                    rules: Optional[Sequence[MaintenanceRuleArgs]] = None,
                    times: Optional[Sequence[MaintenanceTimeArgs]] = None)
    func NewMaintenance(ctx *Context, name string, args MaintenanceArgs, opts ...ResourceOption) (*Maintenance, error)
    public Maintenance(string name, MaintenanceArgs args, CustomResourceOptions? opts = null)
    public Maintenance(String name, MaintenanceArgs args)
    public Maintenance(String name, MaintenanceArgs args, CustomResourceOptions options)
    
    type: opsgenie:Maintenance
    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 MaintenanceArgs
    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 MaintenanceArgs
    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 MaintenanceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args MaintenanceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args MaintenanceArgs
    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 maintenanceResource = new Opsgenie.Maintenance("maintenanceResource", new()
    {
        Description = "string",
        Rules = new[]
        {
            new Opsgenie.Inputs.MaintenanceRuleArgs
            {
                Entities = new[]
                {
                    new Opsgenie.Inputs.MaintenanceRuleEntityArgs
                    {
                        Id = "string",
                        Type = "string",
                    },
                },
                State = "string",
            },
        },
        Times = new[]
        {
            new Opsgenie.Inputs.MaintenanceTimeArgs
            {
                Type = "string",
                EndDate = "string",
                StartDate = "string",
            },
        },
    });
    
    example, err := opsgenie.NewMaintenance(ctx, "maintenanceResource", &opsgenie.MaintenanceArgs{
    	Description: pulumi.String("string"),
    	Rules: opsgenie.MaintenanceRuleArray{
    		&opsgenie.MaintenanceRuleArgs{
    			Entities: opsgenie.MaintenanceRuleEntityArray{
    				&opsgenie.MaintenanceRuleEntityArgs{
    					Id:   pulumi.String("string"),
    					Type: pulumi.String("string"),
    				},
    			},
    			State: pulumi.String("string"),
    		},
    	},
    	Times: opsgenie.MaintenanceTimeArray{
    		&opsgenie.MaintenanceTimeArgs{
    			Type:      pulumi.String("string"),
    			EndDate:   pulumi.String("string"),
    			StartDate: pulumi.String("string"),
    		},
    	},
    })
    
    var maintenanceResource = new Maintenance("maintenanceResource", MaintenanceArgs.builder()
        .description("string")
        .rules(MaintenanceRuleArgs.builder()
            .entities(MaintenanceRuleEntityArgs.builder()
                .id("string")
                .type("string")
                .build())
            .state("string")
            .build())
        .times(MaintenanceTimeArgs.builder()
            .type("string")
            .endDate("string")
            .startDate("string")
            .build())
        .build());
    
    maintenance_resource = opsgenie.Maintenance("maintenanceResource",
        description="string",
        rules=[opsgenie.MaintenanceRuleArgs(
            entities=[opsgenie.MaintenanceRuleEntityArgs(
                id="string",
                type="string",
            )],
            state="string",
        )],
        times=[opsgenie.MaintenanceTimeArgs(
            type="string",
            end_date="string",
            start_date="string",
        )])
    
    const maintenanceResource = new opsgenie.Maintenance("maintenanceResource", {
        description: "string",
        rules: [{
            entities: [{
                id: "string",
                type: "string",
            }],
            state: "string",
        }],
        times: [{
            type: "string",
            endDate: "string",
            startDate: "string",
        }],
    });
    
    type: opsgenie:Maintenance
    properties:
        description: string
        rules:
            - entities:
                - id: string
                  type: string
              state: string
        times:
            - endDate: string
              startDate: string
              type: string
    

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

    Description string
    Description for the maintenance.
    Rules List<MaintenanceRule>
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    Times List<MaintenanceTime>
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
    Description string
    Description for the maintenance.
    Rules []MaintenanceRuleArgs
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    Times []MaintenanceTimeArgs
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
    description String
    Description for the maintenance.
    rules List<MaintenanceRule>
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    times List<MaintenanceTime>
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
    description string
    Description for the maintenance.
    rules MaintenanceRule[]
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    times MaintenanceTime[]
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
    description str
    Description for the maintenance.
    rules Sequence[MaintenanceRuleArgs]
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    times Sequence[MaintenanceTimeArgs]
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
    description String
    Description for the maintenance.
    rules List<Property Map>
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    times List<Property Map>
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields

    Outputs

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

    Get an existing Maintenance 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?: MaintenanceState, opts?: CustomResourceOptions): Maintenance
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            rules: Optional[Sequence[MaintenanceRuleArgs]] = None,
            times: Optional[Sequence[MaintenanceTimeArgs]] = None) -> Maintenance
    func GetMaintenance(ctx *Context, name string, id IDInput, state *MaintenanceState, opts ...ResourceOption) (*Maintenance, error)
    public static Maintenance Get(string name, Input<string> id, MaintenanceState? state, CustomResourceOptions? opts = null)
    public static Maintenance get(String name, Output<String> id, MaintenanceState 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:
    Description string
    Description for the maintenance.
    Rules List<MaintenanceRule>
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    Times List<MaintenanceTime>
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
    Description string
    Description for the maintenance.
    Rules []MaintenanceRuleArgs
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    Times []MaintenanceTimeArgs
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
    description String
    Description for the maintenance.
    rules List<MaintenanceRule>
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    times List<MaintenanceTime>
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
    description string
    Description for the maintenance.
    rules MaintenanceRule[]
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    times MaintenanceTime[]
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
    description str
    Description for the maintenance.
    rules Sequence[MaintenanceRuleArgs]
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    times Sequence[MaintenanceTimeArgs]
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
    description String
    Description for the maintenance.
    rules List<Property Map>
    Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
    times List<Property Map>
    Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields

    Supporting Types

    MaintenanceRule, MaintenanceRuleArgs

    Entities List<MaintenanceRuleEntity>
    This field represents the entity that maintenance will be applied. Entity field takes two mandatory fields as id and type.
    State string
    State of rule that will be defined in maintenance and can take either enabled or disabled for policy type rules. This field has to be disabled for integration type entity rules.
    Entities []MaintenanceRuleEntity
    This field represents the entity that maintenance will be applied. Entity field takes two mandatory fields as id and type.
    State string
    State of rule that will be defined in maintenance and can take either enabled or disabled for policy type rules. This field has to be disabled for integration type entity rules.
    entities List<MaintenanceRuleEntity>
    This field represents the entity that maintenance will be applied. Entity field takes two mandatory fields as id and type.
    state String
    State of rule that will be defined in maintenance and can take either enabled or disabled for policy type rules. This field has to be disabled for integration type entity rules.
    entities MaintenanceRuleEntity[]
    This field represents the entity that maintenance will be applied. Entity field takes two mandatory fields as id and type.
    state string
    State of rule that will be defined in maintenance and can take either enabled or disabled for policy type rules. This field has to be disabled for integration type entity rules.
    entities Sequence[MaintenanceRuleEntity]
    This field represents the entity that maintenance will be applied. Entity field takes two mandatory fields as id and type.
    state str
    State of rule that will be defined in maintenance and can take either enabled or disabled for policy type rules. This field has to be disabled for integration type entity rules.
    entities List<Property Map>
    This field represents the entity that maintenance will be applied. Entity field takes two mandatory fields as id and type.
    state String
    State of rule that will be defined in maintenance and can take either enabled or disabled for policy type rules. This field has to be disabled for integration type entity rules.

    MaintenanceRuleEntity, MaintenanceRuleEntityArgs

    Id string
    The id of the entity that maintenance will be applied.
    Type string
    The type of the entity that maintenance will be applied. It can be either integration or policy.
    Id string
    The id of the entity that maintenance will be applied.
    Type string
    The type of the entity that maintenance will be applied. It can be either integration or policy.
    id String
    The id of the entity that maintenance will be applied.
    type String
    The type of the entity that maintenance will be applied. It can be either integration or policy.
    id string
    The id of the entity that maintenance will be applied.
    type string
    The type of the entity that maintenance will be applied. It can be either integration or policy.
    id str
    The id of the entity that maintenance will be applied.
    type str
    The type of the entity that maintenance will be applied. It can be either integration or policy.
    id String
    The id of the entity that maintenance will be applied.
    type String
    The type of the entity that maintenance will be applied. It can be either integration or policy.

    MaintenanceTime, MaintenanceTimeArgs

    Type string
    EndDate string
    StartDate string
    Type string
    EndDate string
    StartDate string
    type String
    endDate String
    startDate String
    type string
    endDate string
    startDate string
    type String
    endDate String
    startDate String

    Import

    Maintenance policies can be imported using the policy_id, e.g.

    $ pulumi import opsgenie:index/maintenance:Maintenance test policy_id`
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Opsgenie pulumi/pulumi-opsgenie
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the opsgenie Terraform Provider.
    opsgenie logo
    Opsgenie v1.3.8 published on Monday, Jun 24, 2024 by Pulumi