Skip to main content

connectivity_tests

Creates, updates, deletes, gets or lists a connectivity_tests resource.

Overview

Nameconnectivity_tests
TypeResource
Idgoogle.networkmanagement.connectivity_tests

Fields

NameDatatypeDescription
namestringIdentifier. Unique name of the resource using the form: projects/{project_id}/locations/global/connectivityTests/{test_id}
descriptionstringThe user-supplied description of the Connectivity Test. Maximum of 512 characters.
bypassFirewallChecksbooleanWhether the test should skip firewall checking. If not provided, we assume false.
createTimestringOutput only. The time the test was created.
destinationobjectSource or destination of the Connectivity Test.
displayNamestringOutput only. The display name of a Connectivity Test.
labelsobjectResource labels to represent user-provided metadata.
probingDetailsobjectResults of active probing from the last run of the test.
protocolstringIP Protocol of the test. When not provided, "TCP" is assumed.
reachabilityDetailsobjectResults of the configuration analysis from the last run of the test.
relatedProjectsarrayOther projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
sourceobjectSource or destination of the Connectivity Test.
updateTimestringOutput only. The time the test's configuration was updated.

Methods

NameAccessible byRequired ParamsDescription
getSELECTconnectivityTestsId, projectsIdGets the details of a specific Connectivity Test.
listSELECTprojectsIdLists all Connectivity Tests owned by a project.
createINSERTprojectsIdCreates a new Connectivity Test. After you create a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. If the endpoint specifications in ConnectivityTest are invalid (for example, containing non-existent resources in the network, or you don't have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in ConnectivityTest are incomplete, the reachability result returns a value of AMBIGUOUS. For more information, see the Connectivity Test documentation.
deleteDELETEconnectivityTestsId, projectsIdDeletes a specific ConnectivityTest.
patchUPDATEconnectivityTestsId, projectsIdUpdates the configuration of an existing ConnectivityTest. After you update a test, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. The Reachability state in the test resource is updated with the new result. If the endpoint specifications in ConnectivityTest are invalid (for example, they contain non-existent resources in the network, or the user does not have read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN. If the endpoint specifications in ConnectivityTest are incomplete, the reachability result returns a value of AMBIGUOUS. See the documentation in ConnectivityTest for more details.
rerunEXECconnectivityTestsId, projectsIdRerun an existing ConnectivityTest. After the user triggers the rerun, the reachability analysis is performed as part of the long running operation, which completes when the analysis completes. Even though the test configuration remains the same, the reachability result may change due to underlying network configuration changes. If the endpoint specifications in ConnectivityTest become invalid (for example, specified resources are deleted in the network, or you lost read permissions to the network configurations of listed projects), then the reachability result returns a value of UNKNOWN.

SELECT examples

Lists all Connectivity Tests owned by a project.

SELECT
name,
description,
bypassFirewallChecks,
createTime,
destination,
displayName,
labels,
probingDetails,
protocol,
reachabilityDetails,
relatedProjects,
source,
updateTime
FROM google.networkmanagement.connectivity_tests
WHERE projectsId = '{{ projectsId }}';

INSERT example

Use the following StackQL query and manifest file to create a new connectivity_tests resource.

/*+ create */
INSERT INTO google.networkmanagement.connectivity_tests (
projectsId,
name,
description,
source,
destination,
protocol,
relatedProjects,
labels,
bypassFirewallChecks
)
SELECT
'{{ projectsId }}',
'{{ name }}',
'{{ description }}',
'{{ source }}',
'{{ destination }}',
'{{ protocol }}',
'{{ relatedProjects }}',
'{{ labels }}',
{{ bypassFirewallChecks }}
;

UPDATE example

Updates a connectivity_tests resource.

/*+ update */
UPDATE google.networkmanagement.connectivity_tests
SET
name = '{{ name }}',
description = '{{ description }}',
source = '{{ source }}',
destination = '{{ destination }}',
protocol = '{{ protocol }}',
relatedProjects = '{{ relatedProjects }}',
labels = '{{ labels }}',
bypassFirewallChecks = true|false
WHERE
connectivityTestsId = '{{ connectivityTestsId }}'
AND projectsId = '{{ projectsId }}';

DELETE example

Deletes the specified connectivity_tests resource.

/*+ delete */
DELETE FROM google.networkmanagement.connectivity_tests
WHERE connectivityTestsId = '{{ connectivityTestsId }}'
AND projectsId = '{{ projectsId }}';