Google Cloud Native is in preview. Google Cloud Classic is fully supported.
google-native.monitoring/v3.Snooze
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
Creates a Snooze that will prevent alerts, which match the provided criteria, from being opened. The Snooze applies for a specific time interval. Note - this resource’s API doesn’t support deletion. When deleted, the resource will persist on Google Cloud even though it will be deleted from Pulumi state.
Create Snooze Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Snooze(name: string, args: SnoozeArgs, opts?: CustomResourceOptions);@overload
def Snooze(resource_name: str,
args: SnoozeArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Snooze(resource_name: str,
opts: Optional[ResourceOptions] = None,
criteria: Optional[CriteriaArgs] = None,
display_name: Optional[str] = None,
interval: Optional[TimeIntervalArgs] = None,
name: Optional[str] = None,
project: Optional[str] = None)func NewSnooze(ctx *Context, name string, args SnoozeArgs, opts ...ResourceOption) (*Snooze, error)public Snooze(string name, SnoozeArgs args, CustomResourceOptions? opts = null)
public Snooze(String name, SnoozeArgs args)
public Snooze(String name, SnoozeArgs args, CustomResourceOptions options)
type: google-native:monitoring/v3:Snooze
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 SnoozeArgs
- 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 SnoozeArgs
- 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 SnoozeArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args SnoozeArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args SnoozeArgs
- 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 snoozeResource = new GoogleNative.Monitoring.V3.Snooze("snoozeResource", new()
{
Criteria = new GoogleNative.Monitoring.V3.Inputs.CriteriaArgs
{
Policies = new[]
{
"string",
},
},
DisplayName = "string",
Interval = new GoogleNative.Monitoring.V3.Inputs.TimeIntervalArgs
{
EndTime = "string",
StartTime = "string",
},
Name = "string",
Project = "string",
});
example, err := monitoringv3.NewSnooze(ctx, "snoozeResource", &monitoringv3.SnoozeArgs{
Criteria: &monitoring.CriteriaArgs{
Policies: pulumi.StringArray{
pulumi.String("string"),
},
},
DisplayName: pulumi.String("string"),
Interval: &monitoring.TimeIntervalArgs{
EndTime: pulumi.String("string"),
StartTime: pulumi.String("string"),
},
Name: pulumi.String("string"),
Project: pulumi.String("string"),
})
var snoozeResource = new Snooze("snoozeResource", SnoozeArgs.builder()
.criteria(CriteriaArgs.builder()
.policies("string")
.build())
.displayName("string")
.interval(TimeIntervalArgs.builder()
.endTime("string")
.startTime("string")
.build())
.name("string")
.project("string")
.build());
snooze_resource = google_native.monitoring.v3.Snooze("snoozeResource",
criteria={
"policies": ["string"],
},
display_name="string",
interval={
"end_time": "string",
"start_time": "string",
},
name="string",
project="string")
const snoozeResource = new google_native.monitoring.v3.Snooze("snoozeResource", {
criteria: {
policies: ["string"],
},
displayName: "string",
interval: {
endTime: "string",
startTime: "string",
},
name: "string",
project: "string",
});
type: google-native:monitoring/v3:Snooze
properties:
criteria:
policies:
- string
displayName: string
interval:
endTime: string
startTime: string
name: string
project: string
Snooze 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 Snooze resource accepts the following input properties:
- Criteria
Pulumi.
Google Native. Monitoring. V3. Inputs. Criteria - This defines the criteria for applying the Snooze. See Criteria for more information.
- Display
Name string - A display name for the Snooze. This can be, at most, 512 unicode characters.
- Interval
Pulumi.
Google Native. Monitoring. V3. Inputs. Time Interval - The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI.
- Name string
- The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.
- Project string
- Criteria
Criteria
Args - This defines the criteria for applying the Snooze. See Criteria for more information.
- Display
Name string - A display name for the Snooze. This can be, at most, 512 unicode characters.
- Interval
Time
Interval Args - The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI.
- Name string
- The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.
- Project string
- criteria Criteria
- This defines the criteria for applying the Snooze. See Criteria for more information.
- display
Name String - A display name for the Snooze. This can be, at most, 512 unicode characters.
- interval
Time
Interval - The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI.
- name String
- The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.
- project String
- criteria Criteria
- This defines the criteria for applying the Snooze. See Criteria for more information.
- display
Name string - A display name for the Snooze. This can be, at most, 512 unicode characters.
- interval
Time
Interval - The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI.
- name string
- The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.
- project string
- criteria
Criteria
Args - This defines the criteria for applying the Snooze. See Criteria for more information.
- display_
name str - A display name for the Snooze. This can be, at most, 512 unicode characters.
- interval
Time
Interval Args - The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI.
- name str
- The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.
- project str
- criteria Property Map
- This defines the criteria for applying the Snooze. See Criteria for more information.
- display
Name String - A display name for the Snooze. This can be, at most, 512 unicode characters.
- interval Property Map
- The Snooze will be active from interval.start_time through interval.end_time. interval.start_time cannot be in the past. There is a 15 second clock skew to account for the time it takes for a request to reach the API from the UI.
- name String
- The name of the Snooze. The format is: projects/[PROJECT_ID_OR_NUMBER]/snoozes/[SNOOZE_ID] The ID of the Snooze will be generated by the system.
- project String
Outputs
All input properties are implicitly available as output properties. Additionally, the Snooze 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.
Supporting Types
Criteria, CriteriaArgs
Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied.- Policies List<string>
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
- Policies []string
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
- policies List<String>
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
- policies string[]
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
- policies Sequence[str]
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
- policies List<String>
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
CriteriaResponse, CriteriaResponseArgs
Criteria specific to the AlertPolicys that this Snooze applies to. The Snooze will suppress alerts that come from one of the AlertPolicys whose names are supplied.- Policies List<string>
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
- Policies []string
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
- policies List<String>
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
- policies string[]
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
- policies Sequence[str]
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
- policies List<String>
- The specific AlertPolicy names for the alert that should be snoozed. The format is: projects/[PROJECT_ID_OR_NUMBER]/alertPolicies/[POLICY_ID] There is a limit of 16 policies per snooze. This limit is checked during snooze creation.
TimeInterval, TimeIntervalArgs
Describes a time interval: Reads: A half-open time interval. It includes the end time but excludes the start time: (startTime, endTime]. The start time must be specified, must be earlier than the end time, and should be no older than the data retention period for the metric. Writes: A closed time interval. It extends from the start time to the end time, and includes both: [startTime, endTime]. Valid time intervals depend on the MetricKind (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. The end time must not be earlier than the start time, and the end time must not be more than 25 hours in the past or more than five minutes in the future. For GAUGE metrics, the startTime value is technically optional; if no value is specified, the start time defaults to the value of the end time, and the interval represents a single point in time. If both start and end times are specified, they must be identical. Such an interval is valid only for GAUGE metrics, which are point-in-time measurements. The end time of a new interval must be at least a millisecond after the end time of the previous interval. For DELTA metrics, the start time and end time must specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For DELTA metrics, the start time of the next interval must be at least a millisecond after the end time of the previous interval. For CUMULATIVE metrics, the start time and end time must specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points. The new start time must be at least a millisecond after the end time of the previous interval. The start time of a new interval must be at least a millisecond after the end time of the previous interval because intervals are closed. If the start time of a new interval is the same as the end time of the previous interval, then data written at the new start time could overwrite data written at the previous end time.- end_
time str - The end of the time interval.
- start_
time str - Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.
TimeIntervalResponse, TimeIntervalResponseArgs
Describes a time interval: Reads: A half-open time interval. It includes the end time but excludes the start time: (startTime, endTime]. The start time must be specified, must be earlier than the end time, and should be no older than the data retention period for the metric. Writes: A closed time interval. It extends from the start time to the end time, and includes both: [startTime, endTime]. Valid time intervals depend on the MetricKind (https://cloud.google.com/monitoring/api/ref_v3/rest/v3/projects.metricDescriptors#MetricKind) of the metric value. The end time must not be earlier than the start time, and the end time must not be more than 25 hours in the past or more than five minutes in the future. For GAUGE metrics, the startTime value is technically optional; if no value is specified, the start time defaults to the value of the end time, and the interval represents a single point in time. If both start and end times are specified, they must be identical. Such an interval is valid only for GAUGE metrics, which are point-in-time measurements. The end time of a new interval must be at least a millisecond after the end time of the previous interval. For DELTA metrics, the start time and end time must specify a non-zero interval, with subsequent points specifying contiguous and non-overlapping intervals. For DELTA metrics, the start time of the next interval must be at least a millisecond after the end time of the previous interval. For CUMULATIVE metrics, the start time and end time must specify a non-zero interval, with subsequent points specifying the same start time and increasing end times, until an event resets the cumulative value to zero and sets a new start time for the following points. The new start time must be at least a millisecond after the end time of the previous interval. The start time of a new interval must be at least a millisecond after the end time of the previous interval because intervals are closed. If the start time of a new interval is the same as the end time of the previous interval, then data written at the new start time could overwrite data written at the previous end time.- end_
time str - The end of the time interval.
- start_
time str - Optional. The beginning of the time interval. The default value for the start time is the end time. The start time must not be later than the end time.
Package Details
- Repository
- Google Cloud Native pulumi/pulumi-google-native
- License
- Apache-2.0
Google Cloud Native is in preview. Google Cloud Classic is fully supported.
