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

The following fields are returned by SELECT queries:

Successful response

NameDatatypeDescription
namestringIdentifier. Unique name of the resource using the form: projects/{project_id}/locations/global/connectivityTests/{test_id}
bypassFirewallChecksbooleanWhether the analysis should skip firewall checking. Default value is false.
createTimestring (google-datetime)Output only. The time the test was created.
descriptionstringThe user-supplied description of the Connectivity Test. Maximum of 512 characters.
destinationobjectRequired. Destination specification of the Connectivity Test. You can use a combination of destination IP address, URI of a supported endpoint, project ID, or VPC network to identify the destination location. Reachability analysis proceeds even if the destination location is ambiguous. However, the test result might include endpoints or use a destination that you don't intend to test. (id: Endpoint)
displayNamestringOutput only. The display name of a Connectivity Test.
labelsobjectResource labels to represent user-provided metadata.
probingDetailsobjectOutput only. The probing details of this test from the latest run, present for applicable tests only. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test. (id: ProbingDetails)
protocolstringIP Protocol of the test. When not provided, "TCP" is assumed.
reachabilityDetailsobjectOutput only. The reachability details of this test from the latest run. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test. (id: ReachabilityDetails)
relatedProjectsarrayOther projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
returnReachabilityDetailsobjectOutput only. The reachability details of this test from the latest run for the return path. The details are updated when creating a new test, updating an existing test, or triggering a one-time rerun of an existing test. (id: ReachabilityDetails)
roundTripbooleanWhether run analysis for the return path from destination to source. Default value is false.
sourceobjectRequired. Source specification of the Connectivity Test. You can use a combination of source IP address, URI of a supported endpoint, project ID, or VPC network to identify the source location. Reachability analysis might proceed even if the source location is ambiguous. However, the test result might include endpoints or use a source that you don't intend to test. (id: Endpoint)
updateTimestring (google-datetime)Output only. The time the test's configuration was updated.

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectprojectsId, connectivityTestsIdGets the details of a specific Connectivity Test.
listselectprojectsIdpageSize, pageToken, filter, orderByLists all Connectivity Tests owned by a project.
createinsertprojectsIdtestIdCreates 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.
patchupdateprojectsId, connectivityTestsIdupdateMaskUpdates 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.
deletedeleteprojectsId, connectivityTestsIdDeletes a specific ConnectivityTest.
rerunexecprojectsId, connectivityTestsIdRerun 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.

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
connectivityTestsIdstring
projectsIdstring
filterstring
orderBystring
pageSizeinteger (int32)
pageTokenstring
testIdstring
updateMaskstring (google-fieldmask)

SELECT examples

Gets the details of a specific Connectivity Test.

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

INSERT examples

Creates 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.

INSERT INTO google.networkmanagement.connectivity_tests (
data__name,
data__description,
data__source,
data__destination,
data__protocol,
data__relatedProjects,
data__labels,
data__roundTrip,
data__bypassFirewallChecks,
projectsId,
testId
)
SELECT
'{{ name }}',
'{{ description }}',
'{{ source }}',
'{{ destination }}',
'{{ protocol }}',
'{{ relatedProjects }}',
'{{ labels }}',
{{ roundTrip }},
{{ bypassFirewallChecks }},
'{{ projectsId }}',
'{{ testId }}'
RETURNING
name,
done,
error,
metadata,
response
;

UPDATE examples

Updates 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.

UPDATE google.networkmanagement.connectivity_tests
SET
data__name = '{{ name }}',
data__description = '{{ description }}',
data__source = '{{ source }}',
data__destination = '{{ destination }}',
data__protocol = '{{ protocol }}',
data__relatedProjects = '{{ relatedProjects }}',
data__labels = '{{ labels }}',
data__roundTrip = {{ roundTrip }},
data__bypassFirewallChecks = {{ bypassFirewallChecks }}
WHERE
projectsId = '{{ projectsId }}' --required
AND connectivityTestsId = '{{ connectivityTestsId }}' --required
AND updateMask = '{{ updateMask}}'
RETURNING
name,
done,
error,
metadata,
response;

DELETE examples

Deletes a specific ConnectivityTest.

DELETE FROM google.networkmanagement.connectivity_tests
WHERE projectsId = '{{ projectsId }}' --required
AND connectivityTestsId = '{{ connectivityTestsId }}' --required;

Lifecycle Methods

Rerun 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.

EXEC google.networkmanagement.connectivity_tests.rerun 
@projectsId='{{ projectsId }}' --required,
@connectivityTestsId='{{ connectivityTestsId }}' --required;