connections
Creates, updates, deletes, gets or lists a connections
resource.
Overview
Name | connections |
Type | Resource |
Id | google.developerconnect.connections |
Fields
Name | Datatype | Description |
---|---|---|
name | string | Identifier. The resource name of the connection, in the format projects/{project}/locations/{location}/connections/{connection_id} . |
annotations | object | Optional. Allows clients to store small amounts of arbitrary data. |
createTime | string | Output only. [Output only] Create timestamp |
deleteTime | string | Output only. [Output only] Delete timestamp |
disabled | boolean | Optional. If disabled is set to true, functionality is disabled for this connection. Repository based API methods and webhooks processing for repositories in this connection will be disabled. |
etag | string | Optional. This checksum is computed by the server based on the value of other fields, and may be sent on update and delete requests to ensure the client has an up-to-date value before proceeding. |
githubConfig | object | Configuration for connections to github.com. |
installationState | object | Describes stage and necessary actions to be taken by the user to complete the installation. Used for GitHub and GitHub Enterprise based connections. |
labels | object | Optional. Labels as key value pairs |
reconciling | boolean | Output only. Set to true when the connection is being set up or updated in the background. |
uid | string | Output only. A system-assigned unique identifier for a the GitRepositoryLink. |
updateTime | string | Output only. [Output only] Update timestamp |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | connectionsId, locationsId, projectsId | Gets details of a single Connection. |
list | SELECT | locationsId, projectsId | Lists Connections in a given project and location. |
create | INSERT | locationsId, projectsId | Creates a new Connection in a given project and location. |
delete | DELETE | connectionsId, locationsId, projectsId | Deletes a single Connection. |
patch | UPDATE | connectionsId, locationsId, projectsId | Updates the parameters of a single Connection. |
SELECT
examples
Lists Connections in a given project and location.
SELECT
name,
annotations,
createTime,
deleteTime,
disabled,
etag,
githubConfig,
installationState,
labels,
reconciling,
uid,
updateTime
FROM google.developerconnect.connections
WHERE locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
INSERT
example
Use the following StackQL query and manifest file to create a new connections
resource.
- All Properties
- Manifest
/*+ create */
INSERT INTO google.developerconnect.connections (
locationsId,
projectsId,
githubConfig,
name,
labels,
disabled,
annotations,
etag
)
SELECT
'{{ locationsId }}',
'{{ projectsId }}',
'{{ githubConfig }}',
'{{ name }}',
'{{ labels }}',
{{ disabled }},
'{{ annotations }}',
'{{ etag }}'
;
- name: your_resource_model_name
props:
- name: githubConfig
value:
- name: githubApp
value: string
- name: authorizerCredential
value:
- name: oauthTokenSecretVersion
value: string
- name: username
value: string
- name: appInstallationId
value: string
- name: installationUri
value: string
- name: name
value: string
- name: createTime
value: string
- name: updateTime
value: string
- name: deleteTime
value: string
- name: labels
value: object
- name: installationState
value:
- name: stage
value: string
- name: message
value: string
- name: actionUri
value: string
- name: disabled
value: boolean
- name: reconciling
value: boolean
- name: annotations
value: object
- name: etag
value: string
- name: uid
value: string
UPDATE
example
Updates a connections
resource.
/*+ update */
UPDATE google.developerconnect.connections
SET
githubConfig = '{{ githubConfig }}',
name = '{{ name }}',
labels = '{{ labels }}',
disabled = true|false,
annotations = '{{ annotations }}',
etag = '{{ etag }}'
WHERE
connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';
DELETE
example
Deletes the specified connections
resource.
/*+ delete */
DELETE FROM google.developerconnect.connections
WHERE connectionsId = '{{ connectionsId }}'
AND locationsId = '{{ locationsId }}'
AND projectsId = '{{ projectsId }}';