Class ProjectsResource.SubscribersResource
The "subscribers" collection of methods.
Inherited Members
Namespace: Google.Apis.GoogleHealthAPI.v4
Assembly: Google.Apis.GoogleHealthAPI.v4.dll
Syntax
public class ProjectsResource.SubscribersResource
Constructors
SubscribersResource(IClientService)
Constructs a new resource.
Declaration
public SubscribersResource(IClientService service)
Parameters
| Type | Name | Description |
|---|---|---|
| IClientService | service |
Methods
Create(CreateSubscriberPayload, string)
Registers a new subscriber endpoint to receive notifications. A subscriber represents an application or
service that wishes to receive data change notifications for users who have granted consent. Endpoint
Verification: For a subscriber to be successfully created, the provided endpoint_uri must be a valid
HTTPS endpoint and must pass an automated verification check. The backend will send two HTTP POST
requests to the endpoint_uri: 1. Verification with Authorization: * Headers: Includes
Content-Type: application/json and Authorization (with the exact value from
CreateSubscriberPayload.endpoint_authorization.secret). * Body: {"type": "verification"} *
Expected Response: HTTP 201 Created. 2. Verification without Authorization: * Headers:
Includes Content-Type: application/json. The Authorization header is OMITTED. * Body: {"type": "verification"} * Expected Response: HTTP 401 Unauthorized or 403 Forbidden. Both tests must
pass for the subscriber creation to succeed. If verification fails, the operation will not be completed
and an error will be returned. This process ensures the endpoint is reachable and correctly validates
the Authorization header.
Declaration
public virtual ProjectsResource.SubscribersResource.CreateRequest Create(CreateSubscriberPayload body, string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| CreateSubscriberPayload | body | The body of the request. |
| string | parent | Required. The parent resource where this subscriber will be created. Format: projects/{project} Example: projects/my-project-123 |
Returns
| Type | Description |
|---|---|
| ProjectsResource.SubscribersResource.CreateRequest |
Delete(string)
Deletes a subscriber registration. This will stop all notifications to the subscriber's endpoint.
Declaration
public virtual ProjectsResource.SubscribersResource.DeleteRequest Delete(string name)
Parameters
| Type | Name | Description |
|---|---|---|
| string | name | Required. The name of the subscriber to delete. Format: projects/{project}/subscribers/{subscriber} Example: projects/my-project/subscribers/my-subscriber-123 The {subscriber} ID is user-settable (4-36 characters, matching /a-z/) or system-generated if not provided during creation. |
Returns
| Type | Description |
|---|---|
| ProjectsResource.SubscribersResource.DeleteRequest |
List(string)
Lists all subscribers registered within the owned Google Cloud Project.
Declaration
public virtual ProjectsResource.SubscribersResource.ListRequest List(string parent)
Parameters
| Type | Name | Description |
|---|---|---|
| string | parent | Required. The parent, which owns this collection of subscribers. Format: projects/{project} |
Returns
| Type | Description |
|---|---|
| ProjectsResource.SubscribersResource.ListRequest |
Patch(Subscriber, string)
Updates the configuration of an existing subscriber, such as the endpoint URI or the data types it's
interested in. Endpoint Verification: If the endpoint_uri or endpoint_authorization field is
included in the update_mask, the backend will re-verify the endpoint. The verification process is the
same as described in CreateSubscriber: 1. Verification with Authorization: POST to the new or
existing endpoint_uri with the new or existing Authorization secret. Expects HTTP 201 Created. 2.
Verification without Authorization: POST to the endpoint_uri without the Authorization header.
Expects HTTP 401 Unauthorized or 403 Forbidden. Both tests must pass using the potentially updated
values for the subscriber update to succeed. If verification fails, the update will not be applied, and
an error will be returned.
Declaration
public virtual ProjectsResource.SubscribersResource.PatchRequest Patch(Subscriber body, string name)
Parameters
| Type | Name | Description |
|---|---|---|
| Subscriber | body | The body of the request. |
| string | name | Identifier. The resource name of the Subscriber. Format: projects/{project}/subscribers/{subscriber} The {project} ID is a Google Cloud Project ID or Project Number. The {subscriber} ID is user-settable (4-36 characters, matching /a-z/) if provided during creation, or system-generated otherwise (e.g., a UUID). Example (User-settable subscriber ID): projects/my-project/subscribers/my-sub-123 Example (System-generated subscriber ID): projects/my-project/subscribers/a1b2c3d4-e5f6-7890-1234-567890abcdef |
Returns
| Type | Description |
|---|---|
| ProjectsResource.SubscribersResource.PatchRequest |