opsgenie.Maintenance
Explore with Pulumi AI
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=[{
"entities": [{
"id": "string",
"type": "string",
}],
"state": "string",
}],
times=[{
"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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Maintenance resource accepts the following input properties:
- Description string
- Description for the maintenance.
- Rules
List<Maintenance
Rule> - Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
- Times
List<Maintenance
Time> - Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
- Description string
- Description for the maintenance.
- Rules
[]Maintenance
Rule Args - Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
- Times
[]Maintenance
Time Args - Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
- description String
- Description for the maintenance.
- rules
List<Maintenance
Rule> - Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
- times
List<Maintenance
Time> - Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
- description string
- Description for the maintenance.
- rules
Maintenance
Rule[] - Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
- times
Maintenance
Time[] - Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
- description str
- Description for the maintenance.
- rules
Sequence[Maintenance
Rule Args] - Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
- times
Sequence[Maintenance
Time Args] - 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.
- Description string
- Description for the maintenance.
- Rules
List<Maintenance
Rule> - Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
- Times
List<Maintenance
Time> - Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
- Description string
- Description for the maintenance.
- Rules
[]Maintenance
Rule Args - Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
- Times
[]Maintenance
Time Args - Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
- description String
- Description for the maintenance.
- rules
List<Maintenance
Rule> - Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
- times
List<Maintenance
Time> - Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
- description string
- Description for the maintenance.
- rules
Maintenance
Rule[] - Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
- times
Maintenance
Time[] - Time configuration of maintenance. It takes a time object which has type, startDate and endDate fields
- description str
- Description for the maintenance.
- rules
Sequence[Maintenance
Rule Args] - Rules of maintenance, which takes a list of rule objects and defines the maintenance rules over integrations and policies.
- times
Sequence[Maintenance
Time Args] - 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<Maintenance
Rule Entity> - 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
[]Maintenance
Rule Entity - 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<Maintenance
Rule Entity> - 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
Maintenance
Rule Entity[] - 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[Maintenance
Rule Entity] - 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
MaintenanceTime, MaintenanceTimeArgs
- type str
- end_
date str - This parameter takes a date format as (yyyy-MM-dd'T'HH:mm:ssZ) (e.g. 2019-06-11T08:00:00+02:00).
- start_
date str - This parameter takes a date format as (yyyy-MM-dd'T'HH:mm:ssZ) (e.g. 2019-06-11T08:00:00+02:00).
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.