Class: DatadogAPIClient::V1::WebhooksIntegration
- Inherits:
-
Object
- Object
- DatadogAPIClient::V1::WebhooksIntegration
- Defined in:
- lib/datadog_api_client/v1/models/webhooks_integration.rb
Overview
Datadog-Webhooks integration.
Instance Attribute Summary collapse
-
#custom_headers ⇒ Object
If ‘null`, uses no header.
-
#encode_as ⇒ Object
Returns the value of attribute encode_as.
-
#name ⇒ Object
The name of the webhook.
-
#payload ⇒ Object
If ‘null`, uses the default payload.
-
#url ⇒ Object
URL of the webhook.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ WebhooksIntegration
constructor
Initializes the object.
Constructor Details
#initialize(attributes = {}) ⇒ WebhooksIntegration
Initializes the object
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/datadog_api_client/v1/models/webhooks_integration.rb', line 81 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V1::WebhooksIntegration` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| if (!self.class.attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `DatadogAPIClient::V1::WebhooksIntegration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'custom_headers') self.custom_headers = attributes[:'custom_headers'] end if attributes.key?(:'encode_as') self.encode_as = attributes[:'encode_as'] else self.encode_as = 'json' end if attributes.key?(:'name') self.name = attributes[:'name'] end if attributes.key?(:'payload') self.payload = attributes[:'payload'] end if attributes.key?(:'url') self.url = attributes[:'url'] end end |
Instance Attribute Details
#custom_headers ⇒ Object
If ‘null`, uses no header. If given a JSON payload, these will be headers attached to your webhook.
27 28 29 |
# File 'lib/datadog_api_client/v1/models/webhooks_integration.rb', line 27 def custom_headers @custom_headers end |
#encode_as ⇒ Object
Returns the value of attribute encode_as.
29 30 31 |
# File 'lib/datadog_api_client/v1/models/webhooks_integration.rb', line 29 def encode_as @encode_as end |
#name ⇒ Object
The name of the webhook. It corresponds with ‘<WEBHOOK_NAME>`. Learn more on how to use it in [monitor notifications](docs.datadoghq.com/monitors/notify).
32 33 34 |
# File 'lib/datadog_api_client/v1/models/webhooks_integration.rb', line 32 def name @name end |
#payload ⇒ Object
If ‘null`, uses the default payload. If given a JSON payload, the webhook returns the payload specified by the given payload. [Webhooks variable usage](docs.datadoghq.com/integrations/webhooks/#usage).
35 36 37 |
# File 'lib/datadog_api_client/v1/models/webhooks_integration.rb', line 35 def payload @payload end |
#url ⇒ Object
URL of the webhook.
38 39 40 |
# File 'lib/datadog_api_client/v1/models/webhooks_integration.rb', line 38 def url @url end |