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.

Scopes

You will need authorization for the https://www.googleapis.com/auth/cloud-platform scope to make a valid call.

If unset, the scope for this method defaults to https://www.googleapis.com/auth/cloud-platform. You can set the scope for this method like this: networkmanagement1 --scope <scope> projects locations-global-connectivity-tests-create ...

Required Scalar Argument

  • <parent> (string)
    • Required. The parent resource of the Connectivity Test to create: projects/{project_id}/locations/global

Required Request Value

The request value is a data-structure with various fields. Each field may be a simple scalar or another data-structure. In the latter case it is advised to set the field-cursor to the data-structure's field to specify values more concisely.

For example, a structure like this:

ConnectivityTest:
  create-time: string
  description: string
  destination:
    app-engine-version:
      uri: string
    cloud-function:
      uri: string
    cloud-run-revision:
      uri: string
    cloud-sql-instance: string
    forwarding-rule: string
    forwarding-rule-target: string
    gke-master-cluster: string
    instance: string
    ip-address: string
    load-balancer-id: string
    load-balancer-type: string
    network: string
    network-type: string
    port: integer
    project-id: string
  display-name: string
  labels: { string: string }
  name: string
  probing-details:
    abort-cause: string
    destination-egress-location:
      metropolitan-area: string
    endpoint-info:
      destination-ip: string
      destination-network-uri: string
      destination-port: integer
      protocol: string
      source-agent-uri: string
      source-ip: string
      source-network-uri: string
      source-port: integer
    error:
      code: integer
      message: string
    result: string
    sent-probe-count: integer
    successful-probe-count: integer
    verify-time: string
  protocol: string
  reachability-details:
    error:
      code: integer
      message: string
    result: string
    verify-time: string
  related-projects: [string]
  source:
    app-engine-version:
      uri: string
    cloud-function:
      uri: string
    cloud-run-revision:
      uri: string
    cloud-sql-instance: string
    forwarding-rule: string
    forwarding-rule-target: string
    gke-master-cluster: string
    instance: string
    ip-address: string
    load-balancer-id: string
    load-balancer-type: string
    network: string
    network-type: string
    port: integer
    project-id: string
  update-time: string

can be set completely with the following arguments which are assumed to be executed in the given order. Note how the cursor position is adjusted to the respective structures, allowing simple field names to be used most of the time.

  • -r . create-time=et
    • Output only. The time the test was created.
  • description=magna
    • The user-supplied description of the Connectivity Test. Maximum of 512 characters.
  • destination.app-engine-version uri=no

  • ..cloud-function uri=ipsum

  • ..cloud-run-revision uri=voluptua.

    • A Cloud Run revision URI. The format is: projects/{project}/locations/{location}/revisions/{revision}
  • .. cloud-sql-instance=at

  • forwarding-rule=sanctus
    • A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. Forwarding rules are also used for protocol forwarding, Private Service Connect and other network services to provide forwarding information in the control plane. Format: projects/{project}/global/forwardingRules/{id} or projects/{project}/regions/{region}/forwardingRules/{id}
  • forwarding-rule-target=sed
    • Output only. Specifies the type of the target of the forwarding rule.
  • gke-master-cluster=amet.
  • instance=takimata
    • A Compute Engine instance URI.
  • ip-address=amet.
    • The IP address of the endpoint, which can be an external or internal IP.
  • load-balancer-id=duo
    • Output only. ID of the load balancer the forwarding rule points to. Empty for forwarding rules not related to load balancers.
  • load-balancer-type=ipsum
    • Output only. Type of the load balancer the forwarding rule points to.
  • network=gubergren
    • A Compute Engine network URI.
  • network-type=lorem
    • Type of the network where the endpoint is located. Applicable only to source endpoint, as destination network type can be inferred from the source.
  • port=89
    • The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
  • project-id=eos

    • Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID: 1. Only the IP address is specified, and the IP address is within a Google Cloud project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.
  • .. display-name=dolor

    • Output only. The display name of a Connectivity Test.
  • labels=key=ea
    • Resource labels to represent user-provided metadata.
    • the value will be associated with the given key
  • name=ipsum
    • Required. Unique name of the resource using the form: projects/{project_id}/locations/global/connectivityTests/{test_id}
  • probing-details abort-cause=invidunt
    • The reason probing was aborted.
  • destination-egress-location metropolitan-area=amet

    • Name of the metropolitan area.
  • ..endpoint-info destination-ip=duo

    • Destination IP address.
  • destination-network-uri=ipsum
    • URI of the network where this packet is sent to.
  • destination-port=8
    • Destination port. Only valid when protocol is TCP or UDP.
  • protocol=ut
    • IP protocol in string format, for example: "TCP", "UDP", "ICMP".
  • source-agent-uri=gubergren
    • URI of the source telemetry agent this packet originates from.
  • source-ip=rebum.
    • Source IP address.
  • source-network-uri=est
    • URI of the network where this packet originates from.
  • source-port=51

    • Source port. Only valid when protocol is TCP or UDP.
  • ..error code=51

    • The status code, which should be an enum value of google.rpc.Code.
  • message=est

    • A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  • .. result=gubergren

    • The overall result of active probing.
  • sent-probe-count=84
    • Number of probes sent.
  • successful-probe-count=2
    • Number of probes that reached the destination.
  • verify-time=lorem

    • The time that reachability was assessed through active probing.
  • .. protocol=eos

    • IP Protocol of the test. When not provided, "TCP" is assumed.
  • reachability-details.error code=15
    • The status code, which should be an enum value of google.rpc.Code.
  • message=sed

    • A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
  • .. result=duo

    • The overall result of the test's configuration analysis.
  • verify-time=sed

    • The time of the configuration analysis.
  • .. related-projects=no

    • Other projects that may be relevant for reachability analysis. This is applicable to scenarios where a test can cross project boundaries.
    • Each invocation of this argument appends the given value to the array.
  • source.app-engine-version uri=stet

  • ..cloud-function uri=kasd

  • ..cloud-run-revision uri=et

    • A Cloud Run revision URI. The format is: projects/{project}/locations/{location}/revisions/{revision}
  • .. cloud-sql-instance=sed

  • forwarding-rule=et
    • A forwarding rule and its corresponding IP address represent the frontend configuration of a Google Cloud load balancer. Forwarding rules are also used for protocol forwarding, Private Service Connect and other network services to provide forwarding information in the control plane. Format: projects/{project}/global/forwardingRules/{id} or projects/{project}/regions/{region}/forwardingRules/{id}
  • forwarding-rule-target=et
    • Output only. Specifies the type of the target of the forwarding rule.
  • gke-master-cluster=vero
  • instance=erat
    • A Compute Engine instance URI.
  • ip-address=sed
    • The IP address of the endpoint, which can be an external or internal IP.
  • load-balancer-id=duo
    • Output only. ID of the load balancer the forwarding rule points to. Empty for forwarding rules not related to load balancers.
  • load-balancer-type=dolore
    • Output only. Type of the load balancer the forwarding rule points to.
  • network=et
    • A Compute Engine network URI.
  • network-type=voluptua.
    • Type of the network where the endpoint is located. Applicable only to source endpoint, as destination network type can be inferred from the source.
  • port=99
    • The IP protocol port of the endpoint. Only applicable when protocol is TCP or UDP.
  • project-id=consetetur

    • Project ID where the endpoint is located. The Project ID can be derived from the URI if you provide a VM instance or network URI. The following are two cases where you must provide the project ID: 1. Only the IP address is specified, and the IP address is within a Google Cloud project. 2. When you are using Shared VPC and the IP address that you provide is from the service project. In this case, the network that the IP address resides in is defined in the host project.
  • .. update-time=diam

    • Output only. The time the test's configuration was updated.

About Cursors

The cursor position is key to comfortably set complex nested structures. The following rules apply:

  • The cursor position is always set relative to the current one, unless the field name starts with the . character. Fields can be nested such as in -r f.s.o .
  • The cursor position is set relative to the top-level structure if it starts with ., e.g. -r .s.s
  • You can also set nested fields without setting the cursor explicitly. For example, to set a value relative to the current cursor position, you would specify -r struct.sub_struct=bar.
  • You can move the cursor one level up by using ... Each additional . moves it up one additional level. E.g. ... would go three levels up.

Optional Output Flags

The method's return value a JSON encoded structure, which will be written to standard output by default.

  • -o out
    • out specifies the destination to which to write the server's result to. It will be a JSON-encoded structure. The destination may be - to indicate standard output, or a filepath that is to contain the received bytes. If unset, it defaults to standard output.

Optional Method Properties

You may set the following properties to further configure the call. Please note that -p is followed by one or more key-value-pairs, and is called like this -p k1=v1 k2=v2 even though the listing below repeats the -p for completeness.

  • -p test-id=string
    • Required. The logical name of the Connectivity Test in your project with the following restrictions: * Must contain only lowercase letters, numbers, and hyphens. * Must start with a letter. * Must be between 1-40 characters. * Must end with a number or a letter. * Must be unique within the customer project

Optional General Properties

The following properties can configure any call, and are not specific to this method.

  • -p $-xgafv=string

    • V1 error format.
  • -p access-token=string

    • OAuth access token.
  • -p alt=string

    • Data format for response.
  • -p callback=string

    • JSONP
  • -p fields=string

    • Selector specifying which fields to include in a partial response.
  • -p key=string

    • API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
  • -p oauth-token=string

    • OAuth 2.0 token for the current user.
  • -p pretty-print=boolean

    • Returns response with indentations and line breaks.
  • -p quota-user=string

    • Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
  • -p upload-type=string

    • Legacy upload protocol for media (e.g. "media", "multipart").
  • -p upload-protocol=string

    • Upload protocol for media (e.g. "raw", "multipart").