Definitions for @turbot/gcp-pubsub

AvroConfig

{
"description": "Configuration for writing message data in Avro format. Message payloads and metadata will be written to files as an Avro binary.",
"properties": {
"writeMetadata": {
"description": "Optional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key as additional fields in the output. The subscription name, message_id, and publish_time fields are put in their own fields while all other message properties other than data (for example, an ordering_key, if present) are added as entries in the attributes map.",
"type": "boolean"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/AvroConfig",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

AwsKinesis

{
"description": "Ingestion settings for Amazon Kinesis Data Streams.",
"properties": {
"awsRoleArn": {
"description": "Required. AWS role ARN to be used for Federated Identity authentication with Kinesis. Check the Pub/Sub docs for how to set up this role and the required permissions that need to be attached to it.",
"type": "string"
},
"consumerArn": {
"description": "Required. The Kinesis consumer ARN to used for ingestion in Enhanced Fan-Out mode. The consumer must be already created and ready to be used.",
"type": "string"
},
"gcpServiceAccount": {
"description": "Required. The GCP service account to be used for Federated Identity authentication with Kinesis (via a `AssumeRoleWithWebIdentity` call for the provided role). The `aws_role_arn` must be set up with `accounts.google.com:sub` equals to this service account number.",
"type": "string"
},
"state": {
"description": "Output only. An output-only field that indicates the state of the Kinesis ingestion source.",
"enum": [
"STATE_UNSPECIFIED",
"ACTIVE",
"KINESIS_PERMISSION_DENIED",
"PUBLISH_PERMISSION_DENIED",
"STREAM_NOT_FOUND",
"CONSUMER_NOT_FOUND"
],
"readOnly": true,
"type": "string"
},
"streamArn": {
"description": "Required. The Kinesis stream ARN to ingest data from.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/AwsKinesis",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

BigQueryConfig

{
"description": "Configuration for a BigQuery subscription.",
"properties": {
"dropUnknownFields": {
"description": "Optional. When true and use_topic_schema is true, any fields that are a part of the topic schema that are not part of the BigQuery table schema are dropped when writing to BigQuery. Otherwise, the schemas must be kept in sync and any messages with extra fields are not written and remain in the subscription's backlog.",
"type": "boolean"
},
"serviceAccountEmail": {
"description": "Optional. The service account to use to write to BigQuery. The subscription creator or updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the service account. If not specified, the Pub/Sub [service agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.",
"type": "string"
},
"state": {
"description": "Output only. An output-only field that indicates whether or not the subscription can receive messages.",
"enum": [
"STATE_UNSPECIFIED",
"ACTIVE",
"PERMISSION_DENIED",
"NOT_FOUND",
"SCHEMA_MISMATCH",
"IN_TRANSIT_LOCATION_RESTRICTION"
],
"readOnly": true,
"type": "string"
},
"table": {
"description": "Optional. The name of the table to which to write data, of the form {projectId}.{datasetId}.{tableId}",
"type": "string"
},
"useTableSchema": {
"description": "Optional. When true, use the BigQuery table's schema as the columns to write to in BigQuery. `use_table_schema` and `use_topic_schema` cannot be enabled at the same time.",
"type": "boolean"
},
"useTopicSchema": {
"description": "Optional. When true, use the topic's schema as the columns to write to in BigQuery, if it exists. `use_topic_schema` and `use_table_schema` cannot be enabled at the same time.",
"type": "boolean"
},
"writeMetadata": {
"description": "Optional. When true, write the subscription name, message_id, publish_time, attributes, and ordering_key to additional columns in the table. The subscription name, message_id, and publish_time fields are put in their own columns while all other message properties (other than data) are written to a JSON object in the attributes column.",
"type": "boolean"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/BigQueryConfig",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

Binding

{
"description": "Associates `members`, or principals, with a `role`.",
"properties": {
"condition": {
"$ref": "#/definitions/Expr",
"description": "The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies)."
},
"members": {
"description": "Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid}.svc.id.goog[{namespace}/{kubernetes-sa}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workforce identity pool. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/group/{group_id}`: All workforce identities in a group. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All workforce identities with a specific attribute value. * `principalSet://iam.googleapis.com/locations/global/workforcePools/{pool_id}/*`: All identities in a workforce identity pool. * `principal://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/subject/{subject_attribute_value}`: A single identity in a workload identity pool. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/group/{group_id}`: A workload identity pool group. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/attribute.{attribute_name}/{attribute_value}`: All identities in a workload identity pool with a certain attribute. * `principalSet://iam.googleapis.com/projects/{project_number}/locations/global/workloadIdentityPools/{pool_id}/*`: All identities in a workload identity pool. * `deleted:user:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid}?uid={uniqueid}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid}` and the recovered group retains the role in the binding. * `deleted:principal://iam.googleapis.com/locations/global/workforcePools/{pool_id}/subject/{subject_attribute_value}`: Deleted single identity in a workforce identity pool. For example, `deleted:principal://iam.googleapis.com/locations/global/workforcePools/my-pool-id/subject/my-subject-attribute-value`.",
"items": {
"type": "string"
},
"type": "array"
},
"role": {
"description": "Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`. For an overview of the IAM roles and permissions, see the [IAM documentation](https://cloud.google.com/iam/docs/roles-overview). For a list of the available pre-defined roles, see [here](https://cloud.google.com/iam/docs/understanding-roles).",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/Binding",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

CloudStorageConfig

{
"description": "Configuration for a Cloud Storage subscription.",
"properties": {
"avroConfig": {
"$ref": "#/definitions/AvroConfig",
"description": "Optional. If set, message data will be written to Cloud Storage in Avro format."
},
"bucket": {
"description": "Required. User-provided name for the Cloud Storage bucket. The bucket must be created by the user. The bucket name must be without any prefix like \"gs://\". See the [bucket naming requirements] (https://cloud.google.com/storage/docs/buckets#naming).",
"type": "string"
},
"filenamePrefix": {
"description": "Optional. User-provided prefix for Cloud Storage filename. See the [object naming requirements](https://cloud.google.com/storage/docs/objects#naming).",
"type": "string"
},
"filenameSuffix": {
"description": "Optional. User-provided suffix for Cloud Storage filename. See the [object naming requirements](https://cloud.google.com/storage/docs/objects#naming). Must not end in \"/\".",
"type": "string"
},
"maxBytes": {
"description": "Optional. The maximum bytes that can be written to a Cloud Storage file before a new file is created. Min 1 KB, max 10 GiB. The max_bytes limit may be exceeded in cases where messages are larger than the limit.",
"type": "string"
},
"maxDuration": {
"description": "Optional. The maximum duration that can elapse before a new Cloud Storage file is created. Min 1 minute, max 10 minutes, default 5 minutes. May not exceed the subscription's acknowledgement deadline.",
"type": "string"
},
"serviceAccountEmail": {
"description": "Optional. The service account to use to write to Cloud Storage. The subscription creator or updater that specifies this field must have `iam.serviceAccounts.actAs` permission on the service account. If not specified, the Pub/Sub [service agent](https://cloud.google.com/iam/docs/service-agents), service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com, is used.",
"type": "string"
},
"state": {
"description": "Output only. An output-only field that indicates whether or not the subscription can receive messages.",
"enum": [
"STATE_UNSPECIFIED",
"ACTIVE",
"PERMISSION_DENIED",
"NOT_FOUND",
"IN_TRANSIT_LOCATION_RESTRICTION"
],
"readOnly": true,
"type": "string"
},
"textConfig": {
"$ref": "#/definitions/TextConfig",
"description": "Optional. If set, message data will be written to Cloud Storage in text format."
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/CloudStorageConfig",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

DeadLetterPolicy

{
"description": "Dead lettering is done on a best effort basis. The same message might be dead lettered multiple times. If validation on any of the fields fails at subscription creation/updation, the create/update subscription request will fail.",
"properties": {
"deadLetterTopic": {
"description": "Optional. The name of the topic to which dead letter messages should be published. Format is `projects/{project}/topics/{topic}`.The Pub/Sub service account associated with the enclosing subscription's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Publish() to this topic. The operation will fail if the topic does not exist. Users should ensure that there is a subscription attached to this topic since messages published to a topic with no subscriptions are lost.",
"type": "string"
},
"maxDeliveryAttempts": {
"description": "Optional. The maximum number of delivery attempts for any message. The value must be between 5 and 100. The number of delivery attempts is defined as 1 + (the sum of number of NACKs and number of times the acknowledgement deadline has been exceeded for the message). A NACK is any call to ModifyAckDeadline with a 0 deadline. Note that client libraries may automatically extend ack_deadlines. This field will be honored on a best effort basis. If this parameter is 0, a default value of 5 is used.",
"type": "integer"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/DeadLetterPolicy",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

ExpirationPolicy

{
"description": "A policy that specifies the conditions for resource expiration (i.e., automatic resource deletion).",
"properties": {
"ttl": {
"description": "Optional. Specifies the \"time-to-live\" duration for an associated resource. The resource expires if it is not active for a period of `ttl`. The definition of \"activity\" depends on the type of the associated resource. The minimum and maximum allowed values for `ttl` depend on the type of the associated resource, as well. If `ttl` is not set, the associated resource never expires.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/ExpirationPolicy",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

Expr

{
"description": "Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: \"Summary size limit\" description: \"Determines if a summary is less than 100 chars\" expression: \"document.summary.size() < 100\" Example (Equality): title: \"Requestor is owner\" description: \"Determines if requestor is the document owner\" expression: \"document.owner == request.auth.claims.email\" Example (Logic): title: \"Public documents\" description: \"Determine whether the document should be publicly visible\" expression: \"document.type != 'private' && document.type != 'internal'\" Example (Data Manipulation): title: \"Notification string\" description: \"Create a notification string with a timestamp.\" expression: \"'New message received at ' + string(document.create_time)\" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.",
"properties": {
"description": {
"description": "Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.",
"type": "string"
},
"expression": {
"description": "Textual representation of an expression in Common Expression Language syntax.",
"type": "string"
},
"location": {
"description": "Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.",
"type": "string"
},
"title": {
"description": "Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/Expr",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

IngestionDataSourceSettings

{
"description": "Settings for an ingestion data source on a topic.",
"properties": {
"awsKinesis": {
"$ref": "#/definitions/AwsKinesis",
"description": "Optional. Amazon Kinesis Data Streams."
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/IngestionDataSourceSettings",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

MessageStoragePolicy

{
"description": "A policy constraining the storage of messages published to the topic.",
"properties": {
"allowedPersistenceRegions": {
"description": "Optional. A list of IDs of Google Cloud regions where messages that are published to the topic may be persisted in storage. Messages published by publishers running in non-allowed Google Cloud regions (or running outside of Google Cloud altogether) are routed for storage in one of the allowed regions. An empty list means that no regions are allowed, and is not a valid configuration.",
"items": {
"type": "string"
},
"type": "array"
},
"enforceInTransit": {
"description": "Optional. If true, `allowed_persistence_regions` is also used to enforce in-transit guarantees for messages. That is, Pub/Sub will fail Publish operations on this topic and subscribe operations on any subscription attached to this topic in any region that is not in `allowed_persistence_regions`.",
"type": "boolean"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/MessageStoragePolicy",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

NoWrapper

{
"description": "Sets the `data` field as the HTTP body for delivery.",
"properties": {
"writeMetadata": {
"description": "Optional. When true, writes the Pub/Sub message metadata to `x-goog-pubsub-:` headers of the HTTP request. Writes the Pub/Sub message attributes to `:` headers of the HTTP request.",
"type": "boolean"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/NoWrapper",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

OidcToken

{
"description": "Contains information needed for generating an [OpenID Connect token](https://developers.google.com/identity/protocols/OpenIDConnect).",
"properties": {
"audience": {
"description": "Optional. Audience to be used when generating OIDC token. The audience claim identifies the recipients that the JWT is intended for. The audience value is a single case-sensitive string. Having multiple values (array) for the audience field is not supported. More info about the OIDC JWT token audience here: https://tools.ietf.org/html/rfc7519#section-4.1.3 Note: if not specified, the Push endpoint URL will be used.",
"type": "string"
},
"serviceAccountEmail": {
"description": "Optional. [Service account email](https://cloud.google.com/iam/docs/service-accounts) used for generating the OIDC token. For more information on setting up authentication, see [Push subscriptions](https://cloud.google.com/pubsub/docs/push).",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/OidcToken",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

Policy

{
"description": "An Identity and Access Management (IAM) policy, which specifies access controls for Google Cloud resources. A `Policy` is a collection of `bindings`. A `binding` binds one or more `members`, or principals, to a single `role`. Principals can be user accounts, service accounts, Google groups, and domains (such as G Suite). A `role` is a named list of permissions; each `role` can be an IAM predefined role or a user-created custom role. For some types of Google Cloud resources, a `binding` can also specify a `condition`, which is a logical expression that allows access to a resource only if the expression evaluates to `true`. A condition can add constraints based on attributes of the request, the resource, or both. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies). **JSON example:** ``` { \"bindings\": [ { \"role\": \"roles/resourcemanager.organizationAdmin\", \"members\": [ \"user:mike@example.com\", \"group:admins@example.com\", \"domain:google.com\", \"serviceAccount:my-project-id@appspot.gserviceaccount.com\" ] }, { \"role\": \"roles/resourcemanager.organizationViewer\", \"members\": [ \"user:eve@example.com\" ], \"condition\": { \"title\": \"expirable access\", \"description\": \"Does not grant access after Sep 2020\", \"expression\": \"request.time < timestamp('2020-10-01T00:00:00.000Z')\", } } ], \"etag\": \"BwWWja0YfJA=\", \"version\": 3 } ``` **YAML example:** ``` bindings: - members: - user:mike@example.com - group:admins@example.com - domain:google.com - serviceAccount:my-project-id@appspot.gserviceaccount.com role: roles/resourcemanager.organizationAdmin - members: - user:eve@example.com role: roles/resourcemanager.organizationViewer condition: title: expirable access description: Does not grant access after Sep 2020 expression: request.time < timestamp('2020-10-01T00:00:00.000Z') etag: BwWWja0YfJA= version: 3 ``` For a description of IAM and its features, see the [IAM documentation](https://cloud.google.com/iam/docs/).",
"properties": {
"bindings": {
"description": "Associates a list of `members`, or principals, with a `role`. Optionally, may specify a `condition` that determines how and when the `bindings` are applied. Each of the `bindings` must contain at least one principal. The `bindings` in a `Policy` can refer to up to 1,500 principals; up to 250 of these principals can be Google groups. Each occurrence of a principal counts towards these limits. For example, if the `bindings` grant 50 different roles to `user:alice@example.com`, and not to any other principal, then you can add another 1,450 principals to the `bindings` in the `Policy`.",
"items": {
"$ref": "#/definitions/Binding"
},
"type": "array"
},
"etag": {
"description": "`etag` is used for optimistic concurrency control as a way to help prevent simultaneous updates of a policy from overwriting each other. It is strongly suggested that systems make use of the `etag` in the read-modify-write cycle to perform policy updates in order to avoid race conditions: An `etag` is returned in the response to `getIamPolicy`, and systems are expected to put that etag in the request to `setIamPolicy` to ensure that their change will be applied to the same version of the policy. **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost.",
"type": "string"
},
"version": {
"description": "Specifies the format of the policy. Valid values are `0`, `1`, and `3`. Requests that specify an invalid value are rejected. Any operation that affects conditional role bindings must specify version `3`. This requirement applies to the following operations: * Getting a policy that includes a conditional role binding * Adding a conditional role binding to a policy * Changing a conditional role binding in a policy * Removing any role binding, with or without a condition, from a policy that includes conditions **Important:** If you use IAM Conditions, you must include the `etag` field whenever you call `setIamPolicy`. If you omit this field, then IAM allows you to overwrite a version `3` policy with a version `1` policy, and all of the conditions in the version `3` policy are lost. If a policy does not include any conditions, operations on that policy may specify any valid version or leave the field unset. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).",
"type": "integer"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/Policy",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

pubsub

{
"allOf": [
{
"$ref": "turbot#/definitions/service"
},
{
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/pubsubName"
},
"state": {
"$ref": "gcp#/definitions/state"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/pubsubAka"
}
},
"title": {
"type": "string"
},
"custom": {
"type": "object",
"properties": {
"gcp": {
"$ref": "gcp#/definitions/gcpMetadata"
}
}
}
}
}
},
"required": [
"name",
"turbot"
],
"additionalProperties": true,
"tests": [
{
"description": "Valid - base test",
"input": {
"name": "projects/932405488407/services/pubsub.googleapis.com",
"turbot": {
"akas": [
"gcp://serviceusage.googleapis.com/projects/932405488407/services/pubsub.googleapis.com"
],
"title": "Cloud Pub/Sub API",
"custom": {
"gcp": {
"projectId": "cse-legolas-2"
}
}
}
}
}
]
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/pubsub",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

pubsubAka

{
"type": "string",
"pattern": "^gcp://serviceusage.googleapis.com/projects/[0-9]{12}/services/pubsub.googleapis.com",
"tests": [
{
"description": "base",
"input": "gcp://serviceusage.googleapis.com/projects/932405488407/services/pubsub.googleapis.com"
},
{
"description": "invalid aka",
"input": "gcp://serviceusage.googleapis.com/projects/cse-legolas-2/services/pubsub.googleapis.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/pubsubAka",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

pubsubName

{
"type": "string",
"pattern": "^projects/[0-9]{12}/services/pubsub.googleapis.com",
"tests": [
{
"description": "base",
"input": "projects/932405488407/services/pubsub.googleapis.com"
},
{
"description": "invalid name",
"input": "projects/cse-legolas-2/services/iam.googleapis.com",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/pubsubName",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

PubsubWrapper

{
"description": "The payload to the push endpoint is in the form of the JSON representation of a PubsubMessage (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage).",
"properties": {},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/PubsubWrapper",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

PushConfig

{
"description": "Configuration for a push delivery endpoint.",
"properties": {
"attributes": {
"additionalProperties": {
"type": "string"
},
"description": "Optional. Endpoint configuration attributes that can be used to control different aspects of the message delivery. The only currently supported attribute is `x-goog-version`, which you can use to change the format of the pushed message. This attribute indicates the version of the data expected by the endpoint. This controls the shape of the pushed message (i.e., its fields and metadata). If not present during the `CreateSubscription` call, it will default to the version of the Pub/Sub API used to make such call. If not present in a `ModifyPushConfig` call, its value will not be changed. `GetSubscription` calls will always return a valid version, even if the subscription was created without this attribute. The only supported values for the `x-goog-version` attribute are: * `v1beta1`: uses the push format defined in the v1beta1 Pub/Sub API. * `v1` or `v1beta2`: uses the push format defined in the v1 Pub/Sub API. For example: `attributes { \"x-goog-version\": \"v1\" }`",
"type": "object"
},
"noWrapper": {
"$ref": "#/definitions/NoWrapper",
"description": "Optional. When set, the payload to the push endpoint is not wrapped."
},
"oidcToken": {
"$ref": "#/definitions/OidcToken",
"description": "Optional. If specified, Pub/Sub will generate and attach an OIDC JWT token as an `Authorization` header in the HTTP request for every pushed message."
},
"pubsubWrapper": {
"$ref": "#/definitions/PubsubWrapper",
"description": "Optional. When set, the payload to the push endpoint is in the form of the JSON representation of a PubsubMessage (https://cloud.google.com/pubsub/docs/reference/rpc/google.pubsub.v1#pubsubmessage)."
},
"pushEndpoint": {
"description": "Optional. A URL locating the endpoint to which messages should be pushed. For example, a Webhook endpoint might use `https://example.com/push`.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/PushConfig",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

RetryPolicy

{
"description": "A policy that specifies how Pub/Sub retries message delivery. Retry delay will be exponential based on provided minimum and maximum backoffs. https://en.wikipedia.org/wiki/Exponential_backoff. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message. Retry Policy is implemented on a best effort basis. At times, the delay between consecutive deliveries may not match the configuration. That is, delay can be more or less than configured backoff.",
"properties": {
"maximumBackoff": {
"description": "Optional. The maximum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 600 seconds.",
"type": "string"
},
"minimumBackoff": {
"description": "Optional. The minimum delay between consecutive deliveries of a given message. Value should be between 0 and 600 seconds. Defaults to 10 seconds.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/RetryPolicy",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

SchemaSettings

{
"description": "Settings for validating messages published against a schema.",
"properties": {
"encoding": {
"description": "Optional. The encoding of messages validated against `schema`.",
"enum": [
"ENCODING_UNSPECIFIED",
"JSON",
"BINARY"
],
"type": "string"
},
"firstRevisionId": {
"description": "Optional. The minimum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against last_revision or any revision created before.",
"type": "string"
},
"lastRevisionId": {
"description": "Optional. The maximum (inclusive) revision allowed for validating messages. If empty or not present, allow any revision to be validated against first_revision or any revision created after.",
"type": "string"
},
"schema": {
"description": "Required. The name of the schema that messages published should be validated against. Format is `projects/{project}/schemas/{schema}`. The value of this field will be `_deleted-schema_` if the schema has been deleted.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/SchemaSettings",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

snapshot

{
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/snapshotName"
},
"labels": {
"$ref": "gcp#/definitions/labels"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/snapshotAka"
}
},
"title": {
"$ref": "#/definitions/snapshotName"
},
"tags": {
"$ref": "gcp#/definitions/labels"
},
"custom": {
"type": "object",
"properties": {
"gcp": {
"$ref": "gcp#/definitions/gcpMetadata"
},
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
}
}
}
}
}
},
"required": [
"name",
"turbot"
],
"tests": [
{
"description": "Valid - All details provided",
"input": {
"name": "projects/test01/snapshots/snapshot1",
"labels": {
"foo": "bar",
"foo1": "bar1"
},
"turbot": {
"tags": {
"foo": "bar",
"foo1": "bar1"
},
"custom": {
"gcp": {
"projectId": "cse-legolas-2",
"regionName": "asia-south1"
}
},
"title": "projects/test01/snapshots/snapshot1"
}
}
},
{
"description": "Invalid - turbot property is missing",
"input": {
"name": "projects/test01/snapshots/snapshot1",
"labels": {
"foo": "bar",
"foo1": "bar1"
}
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/snapshot",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

Snapshot

{
"description": "A snapshot resource. Snapshots are used in [Seek](https://cloud.google.com/pubsub/docs/replay-overview) operations, which allow you to manage message acknowledgments in bulk. That is, you can set the acknowledgment state of messages in an existing subscription to the state captured by a snapshot.",
"properties": {
"expireTime": {
"description": "Optional. The snapshot is guaranteed to exist up until this time. A newly-created snapshot expires no later than 7 days from the time of its creation. Its exact lifetime is determined at creation by the existing backlog in the source subscription. Specifically, the lifetime of the snapshot is `7 days - (age of oldest unacked message in the subscription)`. For example, consider a subscription whose oldest unacked message is 3 days old. If a snapshot is created from this subscription, the snapshot -- which will always capture this 3-day-old backlog as long as the snapshot exists -- will expire in 4 days. The service will refuse to create a snapshot that would expire in less than 1 hour after creation.",
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).",
"type": "object"
},
"name": {
"description": "Optional. The name of the snapshot.",
"type": "string"
},
"topic": {
"description": "Optional. The name of the topic from which this snapshot is retaining messages.",
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/Snapshot",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

snapshotAka

{
"type": "string",
"pattern": "^gcp://pubsub.googleapis.com/projects/[a-z0-9-]{5,29}[a-z0-9]{1}/snapshots$",
"tests": [
{
"descritpion": "base case",
"input": "gcp://pubsub.googleapis.com/projects/cse-legolas-2/snapshots"
},
{
"description": "invalid - invalid arn",
"input": "i.pubsub.com/project/cse-legolas-2/snapshots",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/snapshotAka",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

snapshotName

{
"type": "string",
"pattern": "^projects/[^/]+/snapshots/[^/]+$",
"tests": [
{
"input": "projects/test01/snapshots/snapshot1"
},
{
"input": "projects/__project-2/snapshots/snapshot1"
},
{
"description": "invalid - project id is missing",
"input": "projects//snapshots/snapshot1",
"expected": false
},
{
"description": "invalid - project name provided",
"input": "project/project01",
"expected": false
},
{
"description": "invalid - snapshot name is missing",
"input": "projects/project1/snapshots/",
"expected": false
},
{
"description": "invalid - started with uppercase",
"input": "Projects/test01",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/snapshotName",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

snapshotServiceNow

{
"defaultColumns": {
"project": {
"column": "enabled",
"type": "string",
"path": "metadata.gcp.projectId"
},
"expire_time": {
"column": "enabled",
"label": "Expire Time"
},
"iam_policy": {
"column": "enabled",
"label": "IAM Policy",
"type": "string",
"size": 1000
},
"labels": {
"column": "enabled",
"type": "string",
"size": 1000
},
"snapshot_name": {
"column": "enabled",
"label": "Name",
"path": "data.name"
},
"topic": {
"column": "enabled"
}
},
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/snapshotServiceNow",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

subscription

{
"type": "object",
"properties": {
"topic": {
"$ref": "#/definitions/topicName"
},
"name": {
"$ref": "#/definitions/subscriptionName"
},
"labels": {
"$ref": "gcp#/definitions/labels"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/subscriptionAka"
}
},
"tags": {
"$ref": "gcp#/definitions/labels"
},
"title": {
"$ref": "#/definitions/subscriptionTitle"
},
"custom": {
"type": "object",
"properties": {
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"gcp": {
"$ref": "gcp#/definitions/gcpMetadata"
}
}
}
}
}
},
"required": [
"name",
"turbot"
],
"tests": [
{
"description": "All details provided",
"input": {
"name": "projects/cse-legolas-2/subscriptions/robin",
"topic": "projects/cse-legolas-2/topics/batman-brooklyn-handler",
"turbot": {
"custom": {
"gcp": {
"projectId": "cse-legolas-2"
}
},
"tags": {
"foo": "bar",
"foo1": "bar1"
},
"title": "robin"
}
}
},
{
"description": "invalid - name property is missing",
"input": {
"turbot": {
"custom": {
"gcp": {
"projectId": "cse-legolas-2"
}
}
}
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/subscription",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

Subscription

{
"description": "A subscription resource. If none of `push_config`, `bigquery_config`, or `cloud_storage_config` is set, then the subscriber will pull and ack messages using API methods. At most one of these fields may be set.",
"properties": {
"ackDeadlineSeconds": {
"description": "Optional. The approximate amount of time (on a best-effort basis) Pub/Sub waits for the subscriber to acknowledge receipt before resending the message. In the interval after the message is delivered and before it is acknowledged, it is considered to be _outstanding_. During that time period, the message will not be redelivered (on a best-effort basis). For pull subscriptions, this value is used as the initial value for the ack deadline. To override this value for a given message, call `ModifyAckDeadline` with the corresponding `ack_id` if using non-streaming pull or send the `ack_id` in a `StreamingModifyAckDeadlineRequest` if using streaming pull. The minimum custom deadline you can specify is 10 seconds. The maximum custom deadline you can specify is 600 seconds (10 minutes). If this parameter is 0, a default value of 10 seconds is used. For push delivery, this value is also used to set the request timeout for the call to the push endpoint. If the subscriber never acknowledges the message, the Pub/Sub system will eventually redeliver the message.",
"type": "integer"
},
"bigqueryConfig": {
"$ref": "#/definitions/BigQueryConfig",
"description": "Optional. If delivery to BigQuery is used with this subscription, this field is used to configure it."
},
"cloudStorageConfig": {
"$ref": "#/definitions/CloudStorageConfig",
"description": "Optional. If delivery to Google Cloud Storage is used with this subscription, this field is used to configure it."
},
"deadLetterPolicy": {
"$ref": "#/definitions/DeadLetterPolicy",
"description": "Optional. A policy that specifies the conditions for dead lettering messages in this subscription. If dead_letter_policy is not set, dead lettering is disabled. The Pub/Sub service account associated with this subscriptions's parent project (i.e., service-{project_number}@gcp-sa-pubsub.iam.gserviceaccount.com) must have permission to Acknowledge() messages on this subscription."
},
"detached": {
"description": "Optional. Indicates whether the subscription is detached from its topic. Detached subscriptions don't receive messages from their topic and don't retain any backlog. `Pull` and `StreamingPull` requests will return FAILED_PRECONDITION. If the subscription is a push subscription, pushes to the endpoint will not be made.",
"type": "boolean"
},
"enableExactlyOnceDelivery": {
"description": "Optional. If true, Pub/Sub provides the following guarantees for the delivery of a message with a given value of `message_id` on this subscription: * The message sent to a subscriber is guaranteed not to be resent before the message's acknowledgement deadline expires. * An acknowledged message will not be resent to a subscriber. Note that subscribers may still receive multiple copies of a message when `enable_exactly_once_delivery` is true if the message was published multiple times by a publisher client. These copies are considered distinct by Pub/Sub and have distinct `message_id` values.",
"type": "boolean"
},
"enableMessageOrdering": {
"description": "Optional. If true, messages published with the same `ordering_key` in `PubsubMessage` will be delivered to the subscribers in the order in which they are received by the Pub/Sub system. Otherwise, they may be delivered in any order.",
"type": "boolean"
},
"expirationPolicy": {
"$ref": "#/definitions/ExpirationPolicy",
"description": "Optional. A policy that specifies the conditions for this subscription's expiration. A subscription is considered active as long as any connected subscriber is successfully consuming messages from the subscription or is issuing operations on the subscription. If `expiration_policy` is not set, a *default policy* with `ttl` of 31 days will be used. The minimum allowed value for `expiration_policy.ttl` is 1 day. If `expiration_policy` is set, but `expiration_policy.ttl` is not set, the subscription never expires."
},
"filter": {
"description": "Optional. An expression written in the Pub/Sub [filter language](https://cloud.google.com/pubsub/docs/filtering). If non-empty, then only `PubsubMessage`s whose `attributes` field matches the filter are delivered on this subscription. If empty, then no messages are filtered out.",
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "Optional. See [Creating and managing labels](https://cloud.google.com/pubsub/docs/labels).",
"type": "object"
},
"messageRetentionDuration": {
"description": "Optional. How long to retain unacknowledged messages in the subscription's backlog, from the moment a message is published. If `retain_acked_messages` is true, then this also configures the retention of acknowledged messages, and thus configures how far back in time a `Seek` can be done. Defaults to 7 days. Cannot be more than 7 days or less than 10 minutes.",
"type": "string"
},
"name": {
"description": "Required. The name of the subscription. It must have the format `\"projects/{project}/subscriptions/{subscription}\"`. `{subscription}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.",
"type": "string"
},
"pushConfig": {
"$ref": "#/definitions/PushConfig",
"description": "Optional. If push delivery is used with this subscription, this field is used to configure it."
},
"retainAckedMessages": {
"description": "Optional. Indicates whether to retain acknowledged messages. If true, then messages are not expunged from the subscription's backlog, even if they are acknowledged, until they fall out of the `message_retention_duration` window. This must be true if you would like to [`Seek` to a timestamp] (https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) in the past to replay previously-acknowledged messages.",
"type": "boolean"
},
"retryPolicy": {
"$ref": "#/definitions/RetryPolicy",
"description": "Optional. A policy that specifies how Pub/Sub retries message delivery for this subscription. If not set, the default retry policy is applied. This generally implies that messages will be retried as soon as possible for healthy subscribers. RetryPolicy will be triggered on NACKs or acknowledgement deadline exceeded events for a given message."
},
"state": {
"description": "Output only. An output-only field indicating whether or not the subscription can receive messages.",
"enum": [
"STATE_UNSPECIFIED",
"ACTIVE",
"RESOURCE_ERROR"
],
"readOnly": true,
"type": "string"
},
"topic": {
"description": "Required. The name of the topic from which this subscription is receiving messages. Format is `projects/{project}/topics/{topic}`. The value of this field will be `_deleted-topic_` if the topic has been deleted.",
"type": "string"
},
"topicMessageRetentionDuration": {
"description": "Output only. Indicates the minimum duration for which a message is retained after it is published to the subscription's topic. If this field is set, messages published to the subscription's topic in the last `topic_message_retention_duration` are always available to subscribers. See the `message_retention_duration` field in `Topic`. This field is set only in responses from the server; it is ignored if it is set in any requests.",
"readOnly": true,
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/Subscription",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

subscriptionAka

{
"type": "string",
"pattern": "^gcp://pubsub.googleapis.com/projects/[a-z0-9-]{5,29}[a-z0-9]{1}/subscriptions/(?!goog)[a-zA-Z0-9._~%+-]{3,255}$",
"tests": [
{
"description": "base case",
"input": "gcp://pubsub.googleapis.com/projects/cse-legolas-2/subscriptions/test_subs"
},
{
"description": "invalid - invalid Aka",
"input": "gcp://pubsub.googleapis.com/projects/cse-legolas-2/project/topics/projects/test_topic",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/subscriptionAka",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

subscriptionName

{
"type": "string",
"pattern": "^projects/[a-z0-9-]{5,29}[a-z0-9]{1}/subscriptions/(?!goog)[a-zA-Z0-9._~%+-]{3,255}$",
"tests": [
{
"input": "projects/cse-legolas-2/subscriptions/robin"
},
{
"description": "invalid - project id is missing",
"input": "projects//subscriptions/robin",
"expected": false
},
{
"description": "invalid - project name provided",
"input": "project/project01",
"expected": false
},
{
"description": "invalid - subscription name is missing",
"input": "projects/project1/subscription/",
"expected": false
},
{
"description": "invalid - started with uppercase",
"input": "Projects/test01",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/subscriptionName",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

subscriptionServiceNow

{
"defaultColumns": {
"project": {
"column": "enabled",
"type": "string",
"path": "metadata.gcp.projectId"
},
"ack_deadline_seconds": {
"column": "enabled"
},
"expiration_policy_ttl": {
"column": "enabled",
"type": "string",
"size": 1000,
"path": "data.expirationPolicy",
"label": "Expiration Policy TTL"
},
"iam_policy": {
"column": "enabled",
"label": "IAM Policy",
"type": "string",
"size": 1000
},
"labels": {
"column": "enabled",
"type": "string",
"size": 1000
},
"message_retention_duration": {
"column": "enabled"
},
"subscription_name": {
"column": "enabled",
"path": "data.name",
"label": "Name"
},
"push_config_attributes": {
"column": null,
"path": "data.pushConfig",
"type": "string",
"size": 1000
},
"topic": {
"column": "enabled"
}
},
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/subscriptionServiceNow",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

subscriptionTitle

{
"type": "string",
"pattern": "^(?!goog)[a-zA-Z0-9._~%+-]{3,255}$",
"tests": [
{
"input": "abc_-.%+~%01234"
},
{
"description": "Invalid - should not start with goog",
"input": "googabcdsds",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/subscriptionTitle",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

TextConfig

{
"description": "Configuration for writing message data in text format. Message payloads will be written to files as raw text, separated by a newline.",
"properties": {},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/TextConfig",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

topic

{
"type": "object",
"properties": {
"name": {
"$ref": "#/definitions/topicName"
},
"labels": {
"$ref": "gcp#/definitions/labels"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "#/definitions/topicAka"
}
},
"tags": {
"$ref": "gcp#/definitions/labels"
},
"title": {
"$ref": "#/definitions/topicTitle"
},
"custom": {
"type": "object",
"properties": {
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"gcp": {
"$ref": "gcp#/definitions/gcpMetadata"
}
}
}
}
}
},
"required": [
"name",
"turbot"
],
"tests": [
{
"description": "All details provided",
"input": {
"name": "projects/test01/topics/topic1",
"turbot": {
"custom": {
"gcp": {
"projectId": "cse-legolas-2"
}
},
"tags": {
"foo": "bar",
"foo1": "bar1"
},
"title": "topic1"
}
}
},
{
"description": "invalid - name property is missing",
"input": {
"turbot": {
"custom": {
"gcp": {
"projectId": "cse-legolas-2"
}
}
}
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/topic",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

Topic

{
"description": "A topic resource.",
"properties": {
"ingestionDataSourceSettings": {
"$ref": "#/definitions/IngestionDataSourceSettings",
"description": "Optional. Settings for managed ingestion from a data source into this topic."
},
"kmsKeyName": {
"description": "Optional. The resource name of the Cloud KMS CryptoKey to be used to protect access to messages published on this topic. The expected format is `projects/*/locations/*/keyRings/*/cryptoKeys/*`.",
"type": "string"
},
"labels": {
"additionalProperties": {
"type": "string"
},
"description": "Optional. See [Creating and managing labels] (https://cloud.google.com/pubsub/docs/labels).",
"type": "object"
},
"messageRetentionDuration": {
"description": "Optional. Indicates the minimum duration to retain a message after it is published to the topic. If this field is set, messages published to the topic in the last `message_retention_duration` are always available to subscribers. For instance, it allows any attached subscription to [seek to a timestamp](https://cloud.google.com/pubsub/docs/replay-overview#seek_to_a_time) that is up to `message_retention_duration` in the past. If this field is not set, message retention is controlled by settings on individual subscriptions. Cannot be more than 31 days or less than 10 minutes.",
"type": "string"
},
"messageStoragePolicy": {
"$ref": "#/definitions/MessageStoragePolicy",
"description": "Optional. Policy constraining the set of Google Cloud Platform regions where messages published to the topic may be stored. If not present, then no constraints are in effect."
},
"name": {
"description": "Required. The name of the topic. It must have the format `\"projects/{project}/topics/{topic}\"`. `{topic}` must start with a letter, and contain only letters (`[A-Za-z]`), numbers (`[0-9]`), dashes (`-`), underscores (`_`), periods (`.`), tildes (`~`), plus (`+`) or percent signs (`%`). It must be between 3 and 255 characters in length, and it must not start with `\"goog\"`.",
"type": "string"
},
"satisfiesPzs": {
"description": "Optional. Reserved for future use. This field is set only in responses from the server; it is ignored if it is set in any requests.",
"type": "boolean"
},
"schemaSettings": {
"$ref": "#/definitions/SchemaSettings",
"description": "Optional. Settings for validating messages published against a schema."
},
"state": {
"description": "Output only. An output-only field indicating the state of the topic.",
"enum": [
"STATE_UNSPECIFIED",
"ACTIVE",
"INGESTION_RESOURCE_ERROR"
],
"readOnly": true,
"type": "string"
}
},
"type": "object",
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/Topic",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

topicAka

{
"type": "string",
"pattern": "^gcp://pubsub.googleapis.com/projects/[a-z0-9-]{5,29}[a-z0-9]{1}/topics/(?!goog)[a-zA-Z0-9._~%+-]{3,255}$",
"tests": [
{
"description": "base case",
"input": "gcp://pubsub.googleapis.com/projects/cse-legolas-2/topics/test_topic"
},
{
"description": "invalid - invalid Aka",
"input": "gcp://pubsub.googleapis.com/projects/cse-legolas-2/project/topics/projects/test_topic",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/topicAka",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

topicIamMember

{
"type": "object",
"properties": {
"member": {
"$ref": "gcp-iam#/definitions/memberName"
},
"role": {
"$ref": "gcp-iam#/definitions/projectRoleName"
},
"topic": {
"$ref": "#/definitions/topicTitle"
},
"turbot": {
"type": "object",
"properties": {
"akas": {
"type": "array",
"items": {
"$ref": "gcp-iam#/definitions/memberAka"
}
},
"title": {
"$ref": "gcp-iam#/definitions/memberTitle"
},
"custom": {
"type": "object",
"properties": {
"createTimestamp": {
"$ref": "turbot#/definitions/isoTimestamp"
},
"gcp": {
"$ref": "gcp#/definitions/gcpMetadata"
}
}
}
}
}
},
"required": [
"member",
"role",
"turbot",
"topic"
],
"additionalProperties": true,
"tests": [
{
"description": "all details provided",
"input": {
"member": "user:mesubha97@gmail.com",
"role": "projects/myproject/roles/mytestrole",
"topic": "topic1",
"turbot": {
"akas": [
"gcp://iam.googleapis.com/projects/cse-legolas-2/roles/mytestrole/members/user:venu@turbot.com"
],
"title": "mytestrole - user:test01",
"custom": {
"createTimestamp": "2017-03-05T13:58:05.590Z",
"gcp": {
"projectId": "aar-a4b6d489"
}
}
}
}
},
{
"description": "Invalid - Missing member",
"input": {
"role": "projects/myproject/roles/mytestrole",
"topic": "topic1",
"turbot": {
"akas": [
"gcp://iam.googleapis.com/projects/cse-legolas-2/roles/mytestrole/members/user:venu@turbot.com"
],
"title": "mytestrole - user:test01",
"custom": {
"createTimestamp": "2017-03-05T13:58:05.590Z",
"gcp": {
"projectId": "aar-a4b6d489"
}
}
}
},
"expected": false
},
{
"description": "Invalid - Missing role",
"input": {
"member": "user:mesubha97@gmail.com",
"topic": "topic1",
"turbot": {
"akas": [
"gcp://iam.googleapis.com/projects/cse-legolas-2/roles/mytestrole/members/user:venu@turbot.com"
],
"title": "mytestrole - user:test01",
"custom": {
"createTimestamp": "2017-03-05T13:58:05.590Z",
"gcp": {
"projectId": "aar-a4b6d489"
}
}
}
},
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/topicIamMember",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

topicName

{
"type": "string",
"pattern": "^projects/[a-z0-9-]{5,29}[a-z0-9]{1}/topics/(?!goog)[a-zA-Z0-9._~%+-]{3,255}$",
"tests": [
{
"input": "projects/test01/topics/topic1"
},
{
"description": "invalid - project id is missing",
"input": "projects//topics/topic1",
"expected": false
},
{
"description": "invalid - project name provided",
"input": "project/project01",
"expected": false
},
{
"description": "invalid - topic name is missing",
"input": "projects/project1/topics/",
"expected": false
},
{
"description": "invalid - started with uppercase",
"input": "Projects/test01",
"expected": false
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/topicName",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

topicServiceNow

{
"defaultColumns": {
"project": {
"column": "enabled",
"type": "string",
"path": "metadata.gcp.projectId"
},
"iam_policy": {
"column": "enabled",
"label": "IAM Policy",
"type": "string",
"size": 1000
},
"labels": {
"column": "enabled",
"label": "Labels",
"type": "string",
"size": 1000
},
"topic_name": {
"column": "enabled",
"label": "Name",
"path": "data.name"
}
},
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/topicServiceNow",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}

topicTitle

{
"type": "string",
"pattern": "^(?!goog)[a-zA-Z0-9._~%+-]{3,255}$",
"tests": [
{
"input": "topic1"
}
],
".turbot": {
"uri": "tmod:@turbot/gcp-pubsub#/definitions/topicTitle",
"modUri": "tmod:@turbot/gcp-pubsub"
}
}