Documentation

Google_Service_Monitoring_Resource_ProjectsNotificationChannels extends Google_Service_Resource
in package

The "notificationChannels" collection of methods.

Typical usage is: $monitoringService = new Google_Service_Monitoring(...); $notificationChannels = $monitoringService->notificationChannels;

Table of Contents

$client  : Google_Client
$methods  : array<string|int, mixed>
$resourceName  : string
$rootUrl  : string
$serviceName  : string
$servicePath  : string
$stackParameters  : mixed
__construct()  : mixed
call()  : Google_Http_Request|expectedClass
TODO: This function needs simplifying.
create()  : Google_Service_Monitoring_NotificationChannel
Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service.
createRequestUri()  : string
Parse/expand request parameters and create a fully qualified request uri.
delete()  : Google_Service_Monitoring_MonitoringEmpty
Deletes a notification channel. (notificationChannels.delete)
get()  : Google_Service_Monitoring_NotificationChannel
Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method.
getVerificationCode()  : Google_Service_Monitoring_GetNotificationChannelVerificationCodeResponse
Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state).There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as "G-123456") whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time.
listProjectsNotificationChannels()  : Google_Service_Monitoring_ListNotificationChannelsResponse
Lists the notification channels that have been created for the project.
patch()  : Google_Service_Monitoring_NotificationChannel
Updates a notification channel. Fields not specified in the field mask remain unchanged. (notificationChannels.patch)
sendVerificationCode()  : Google_Service_Monitoring_MonitoringEmpty
Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel.
verify()  : Google_Service_Monitoring_NotificationChannel
Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode.
convertToArrayAndStripNulls()  : mixed

Properties

$methods

private array<string|int, mixed> $methods

$resourceName

private string $resourceName

$serviceName

private string $serviceName

$servicePath

private string $servicePath

$stackParameters

private mixed $stackParameters = array('alt' => array('type' => 'string', 'location' => 'query'), 'fields' => array('type' => 'string', 'location' => 'query'), 'trace' => array('type' => 'string', 'location' => 'query'), 'userIp' => array('type' => 'string', 'location' => 'query'), 'quotaUser' => array('type' => 'string', 'location' => 'query'), 'data' => array('type' => 'string', 'location' => 'body'), 'mimeType' => array('type' => 'string', 'location' => 'header'), 'uploadType' => array('type' => 'string', 'location' => 'query'), 'mediaUpload' => array('type' => 'complex', 'location' => 'query'), 'prettyPrint' => array('type' => 'string', 'location' => 'query'))

Methods

__construct()

public __construct(mixed $service, mixed $serviceName, mixed $resourceName, mixed $resource) : mixed
Parameters
$service : mixed
$serviceName : mixed
$resourceName : mixed
$resource : mixed
Return values
mixed

call()

TODO: This function needs simplifying.

public call( $name,  $arguments[,  $expectedClass = null ]) : Google_Http_Request|expectedClass
Parameters
$name :
$arguments :
$expectedClass : = null
  • optional, the expected class name
Tags
throws
Google_Exception
Return values
Google_Http_Request|expectedClass

create()

Creates a new notification channel, representing a single notification endpoint such as an email address, SMS number, or PagerDuty service.

public create(string $name, Google_Service_Monitoring_NotificationChannel $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Monitoring_NotificationChannel

(notificationChannels.create)

Parameters
$name : string

Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] This names the container into which the channel will be written, this does not name the newly created channel. The resulting channel's name will have a normalized version of this field as a prefix, but will add /notificationChannels/[CHANNEL_ID] to identify the channel.

$postBody : Google_Service_Monitoring_NotificationChannel
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Monitoring_NotificationChannel

createRequestUri()

Parse/expand request parameters and create a fully qualified request uri.

public createRequestUri(string $restPath, array<string|int, mixed> $params) : string
Parameters
$restPath : string
$params : array<string|int, mixed>
Tags
static
Return values
string

$requestUrl

delete()

Deletes a notification channel. (notificationChannels.delete)

public delete(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Monitoring_MonitoringEmpty
Parameters
$name : string

Required. The channel for which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

bool force If true, the notification channel will be deleted regardless of its use in alert policies (the policies will be updated to remove the channel). If false, channels that are still referenced by an existing alerting policy will fail to be deleted in a delete operation.

Return values
Google_Service_Monitoring_MonitoringEmpty

get()

Gets a single notification channel. The channel includes the relevant configuration details with which the channel was created. However, the response may truncate or omit passwords, API keys, or other private key matter and thus the response may not be 100% identical to the information that was supplied in the call to the create method.

public get(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Monitoring_NotificationChannel

(notificationChannels.get)

Parameters
$name : string

Required. The channel for which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID]

$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Monitoring_NotificationChannel

getVerificationCode()

Requests a verification code for an already verified channel that can then be used in a call to VerifyNotificationChannel() on a different channel with an equivalent identity in the same or in a different project. This makes it possible to copy a channel between projects without requiring manual reverification of the channel. If the channel is not in the verified state, this method will fail (in other words, this may only be used if the SendNotificationChannelVerificationCode and VerifyNotificationChannel paths have already been used to put the given channel into the verified state).There is no guarantee that the verification codes returned by this method will be of a similar structure or form as the ones that are delivered to the channel via SendNotificationChannelVerificationCode; while VerifyNotificationChannel() will recognize both the codes delivered via SendNotificationChannelVerificationCode() and returned from GetNotificationChannelVerificationCode(), it is typically the case that the verification codes delivered via SendNotificationChannelVerificationCode() will be shorter and also have a shorter expiration (e.g. codes such as "G-123456") whereas GetVerificationCode() will typically return a much longer, websafe base 64 encoded string that has a longer expiration time.

public getVerificationCode(string $name, Google_Service_Monitoring_GetNotificationChannelVerificationCodeRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Monitoring_GetNotificationChannelVerificationCodeResponse

(notificationChannels.getVerificationCode)

Parameters
$name : string

Required. The notification channel for which a verification code is to be generated and retrieved. This must name a channel that is already verified; if the specified channel is not verified, the request will fail.

$postBody : Google_Service_Monitoring_GetNotificationChannelVerificationCodeRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Monitoring_GetNotificationChannelVerificationCodeResponse

listProjectsNotificationChannels()

Lists the notification channels that have been created for the project.

public listProjectsNotificationChannels(string $name[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Monitoring_ListNotificationChannelsResponse

(notificationChannels.listProjectsNotificationChannels)

Parameters
$name : string

Required. The project on which to execute the request. The format is: projects/[PROJECT_ID_OR_NUMBER] This names the container in which to look for the notification channels; it does not name a specific channel. To query a specific channel by REST resource name, use the GetNotificationChannel operation.

$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string orderBy A comma-separated list of fields by which to sort the result. Supports the same set of fields as in filter. Entries can be prefixed with a minus sign to sort in descending rather than ascending order.For more details, see sorting and filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).

opt_param

string pageToken If non-empty, page_token must contain a value returned as the next_page_token in a previous response to request the next set of results.

opt_param

string filter If provided, this field specifies the criteria that must be met by notification channels to be included in the response.For more details, see sorting and filtering (https://cloud.google.com/monitoring/api/v3/sorting-and-filtering).

opt_param

int pageSize The maximum number of results to return in a single response. If not set to a positive number, a reasonable value will be chosen by the service.

Return values
Google_Service_Monitoring_ListNotificationChannelsResponse

patch()

Updates a notification channel. Fields not specified in the field mask remain unchanged. (notificationChannels.patch)

public patch(string $name, Google_Service_Monitoring_NotificationChannel $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Monitoring_NotificationChannel
Parameters
$name : string

The full REST resource name for this channel. The format is: projects/[PROJECT_ID_OR_NUMBER]/notificationChannels/[CHANNEL_ID] The [CHANNEL_ID] is automatically assigned by the server on creation.

$postBody : Google_Service_Monitoring_NotificationChannel
$optParams : array<string|int, mixed> = array()

Optional parameters.

Tags
opt_param

string updateMask The fields to update.

Return values
Google_Service_Monitoring_NotificationChannel

sendVerificationCode()

Causes a verification code to be delivered to the channel. The code can then be supplied in VerifyNotificationChannel to verify the channel.

public sendVerificationCode(string $name, Google_Service_Monitoring_SendNotificationChannelVerificationCodeRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Monitoring_MonitoringEmpty

(notificationChannels.sendVerificationCode)

Parameters
$name : string

Required. The notification channel to which to send a verification code.

$postBody : Google_Service_Monitoring_SendNotificationChannelVerificationCodeRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Monitoring_MonitoringEmpty

verify()

Verifies a NotificationChannel by proving receipt of the code delivered to the channel as a result of calling SendNotificationChannelVerificationCode.

public verify(string $name, Google_Service_Monitoring_VerifyNotificationChannelRequest $postBody[, array<string|int, mixed> $optParams = array() ]) : Google_Service_Monitoring_NotificationChannel

(notificationChannels.verify)

Parameters
$name : string

Required. The notification channel to verify.

$postBody : Google_Service_Monitoring_VerifyNotificationChannelRequest
$optParams : array<string|int, mixed> = array()

Optional parameters.

Return values
Google_Service_Monitoring_NotificationChannel

convertToArrayAndStripNulls()

protected convertToArrayAndStripNulls(mixed $o) : mixed
Parameters
$o : mixed
Return values
mixed

Search results