Class ProjectsResource.NotificationChannelsResource.GetVerificationCodeRequest
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.
Inheritance
Implements
Inherited Members
Namespace: Google.Apis.Monitoring.v3
Assembly: Google.Apis.Monitoring.v3.dll
Syntax
public class ProjectsResource.NotificationChannelsResource.GetVerificationCodeRequest : MonitoringBaseServiceRequest<GetNotificationChannelVerificationCodeResponse>, IClientServiceRequest<GetNotificationChannelVerificationCodeResponse>, IClientServiceRequest
Constructors
GetVerificationCodeRequest(IClientService, GetNotificationChannelVerificationCodeRequest, string)
Constructs a new GetVerificationCode request.
Declaration
public GetVerificationCodeRequest(IClientService service, GetNotificationChannelVerificationCodeRequest body, string name)
Parameters
Type | Name | Description |
---|---|---|
IClientService | service | |
GetNotificationChannelVerificationCodeRequest | body | |
string | name |
Properties
HttpMethod
Gets the HTTP method.
Declaration
public override string HttpMethod { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
MethodName
Gets the method name.
Declaration
public override string MethodName { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Name
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.
Declaration
[RequestParameter("name", RequestParameterType.Path)]
public virtual string Name { get; }
Property Value
Type | Description |
---|---|
string |
RestPath
Gets the REST path.
Declaration
public override string RestPath { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
GetBody()
Returns the body of the request.
Declaration
protected override object GetBody()
Returns
Type | Description |
---|---|
object |
Overrides
InitParameters()
Initializes GetVerificationCode parameter list.
Declaration
protected override void InitParameters()