services_subnetwork
Creates, updates, deletes, gets or lists a services_subnetwork
resource.
Overview
Name | services_subnetwork |
Type | Resource |
Id | google.servicenetworking.services_subnetwork |
Fields
The following fields are returned by SELECT
queries:
SELECT
not supported for this resource, use SHOW METHODS
to view available operations for the resource.
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
add_subnetwork | insert | servicesId , servicesId1 , servicesId2 | For service producers, provisions a new subnet in a peered service's shared VPC network in the requested region and with the requested size that's expressed as a CIDR range (number of leading bits of ipV4 network mask). The method checks against the assigned allocated ranges to find a non-conflicting IP address range. The method will reuse a subnet if subsequent calls contain the same subnet name, region, and prefix length. This method will make producer's tenant project to be a shared VPC service project as needed. |
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.
Name | Datatype | Description |
---|---|---|
servicesId | string | |
servicesId1 | string | |
servicesId2 | string |
INSERT
examples
- add_subnetwork
- Manifest
For service producers, provisions a new subnet in a peered service's shared VPC network in the requested region and with the requested size that's expressed as a CIDR range (number of leading bits of ipV4 network mask). The method checks against the assigned allocated ranges to find a non-conflicting IP address range. The method will reuse a subnet if subsequent calls contain the same subnet name, region, and prefix length. This method will make producer's tenant project to be a shared VPC service project as needed.
INSERT INTO google.servicenetworking.services_subnetwork (
data__consumerNetwork,
data__subnetwork,
data__region,
data__ipPrefixLength,
data__description,
data__subnetworkUsers,
data__consumer,
data__requestedAddress,
data__secondaryIpRangeSpecs,
data__privateIpv6GoogleAccess,
data__requestedRanges,
data__outsideAllocationPublicIpRange,
data__purpose,
data__checkServiceNetworkingUsePermission,
data__useCustomComputeIdempotencyWindow,
data__computeIdempotencyWindow,
data__allowSubnetCidrRoutesOverlap,
data__role,
data__internalRange,
data__skipRequestedAddressValidation,
servicesId,
servicesId1,
servicesId2
)
SELECT
'{{ consumerNetwork }}',
'{{ subnetwork }}',
'{{ region }}',
{{ ipPrefixLength }},
'{{ description }}',
'{{ subnetworkUsers }}',
'{{ consumer }}',
'{{ requestedAddress }}',
'{{ secondaryIpRangeSpecs }}',
'{{ privateIpv6GoogleAccess }}',
'{{ requestedRanges }}',
'{{ outsideAllocationPublicIpRange }}',
'{{ purpose }}',
{{ checkServiceNetworkingUsePermission }},
{{ useCustomComputeIdempotencyWindow }},
'{{ computeIdempotencyWindow }}',
{{ allowSubnetCidrRoutesOverlap }},
'{{ role }}',
'{{ internalRange }}',
{{ skipRequestedAddressValidation }},
'{{ servicesId }}',
'{{ servicesId1 }}',
'{{ servicesId2 }}'
RETURNING
name,
done,
error,
metadata,
response
;
# Description fields are for documentation purposes
- name: services_subnetwork
props:
- name: servicesId
value: string
description: Required parameter for the services_subnetwork resource.
- name: servicesId1
value: string
description: Required parameter for the services_subnetwork resource.
- name: servicesId2
value: string
description: Required parameter for the services_subnetwork resource.
- name: consumerNetwork
value: string
description: >
Required. The name of the service consumer's VPC network. The network must have an existing private connection that was provisioned through the connections.create method. The name must be in the following format: `projects/{project}/global/networks/{network}`, where {project} is a project number, such as `12345`. {network} is the name of a VPC network in the project.
- name: subnetwork
value: string
description: >
Required. A name for the new subnet. For information about the naming requirements, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.
- name: region
value: string
description: >
Required. The name of a [region](https://cloud.google.com/compute/docs/regions-zones) for the subnet, such `europe-west1`.
- name: ipPrefixLength
value: integer
description: >
Required. The prefix length of the subnet's IP address range. Use CIDR range notation, such as `29` to provision a subnet with an `x.x.x.x/29` CIDR range. The IP address range is drawn from a pool of available ranges in the service consumer's allocated range. GCE disallows subnets with prefix_length > 29
- name: description
value: string
description: >
Optional. Description of the subnet.
- name: subnetworkUsers
value: array
description: >
A list of members that are granted the `roles/servicenetworking.subnetworkAdmin` role on the subnet.
- name: consumer
value: string
description: >
Required. A resource that represents the service consumer, such as `projects/123456`. The project number can be different from the value in the consumer network parameter. For example, the network might be part of a Shared VPC network. In those cases, Service Networking validates that this resource belongs to that Shared VPC.
- name: requestedAddress
value: string
description: >
Optional. The starting address of a range. The address must be a valid IPv4 address in the x.x.x.x format. This value combined with the IP prefix range is the CIDR range for the subnet. The range must be within the allocated range that is assigned to the private connection. If the CIDR range isn't available, the call fails.
- name: secondaryIpRangeSpecs
value: array
description: >
Optional. A list of secondary IP ranges to be created within the new subnetwork.
- name: privateIpv6GoogleAccess
value: string
description: >
Optional. The private IPv6 google access type for the VMs in this subnet. For information about the access types that can be set using this field, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.
- name: requestedRanges
value: array
description: >
Optional. The name of one or more allocated IP address ranges associated with this private service access connection. If no range names are provided all ranges associated with this connection will be considered. If a CIDR range with the specified IP prefix length is not available within these ranges, the call fails.
- name: outsideAllocationPublicIpRange
value: string
description: >
Optional. Enable outside allocation using public IP addresses. Any public IP range may be specified. If this field is provided, we will not use customer reserved ranges for this primary IP range.
- name: purpose
value: string
description: >
Optional. Defines the purpose field of the subnet, e.g. 'PRIVATE_SERVICE_CONNECT'. For information about the purposes that can be set using this field, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.
- name: checkServiceNetworkingUsePermission
value: boolean
description: >
Optional. The IAM permission check determines whether the consumer project has 'servicenetworking.services.use' permission or not.
- name: useCustomComputeIdempotencyWindow
value: boolean
description: >
Optional. Specifies if Service Networking should use a custom time bucket for GCE idempotency. If false, Service Networking uses a 300 second (5 minute) GCE idempotency window. If true, Service Networking uses a custom idempotency window provided by the user in field compute_idempotency_window.
- name: computeIdempotencyWindow
value: string
description: >
Optional. Specifies a custom time bucket for GCE subnetwork request idempotency. If two equivalent concurrent requests are made, GCE will know to ignore the request if it has already been completed or is in progress. Only requests with matching compute_idempotency_window have guaranteed idempotency. Changing this time window between requests results in undefined behavior. Zero (or empty) value with custom_compute_idempotency_window=true specifies no idempotency (i.e. no request ID is provided to GCE). Maximum value of 14 days (enforced by GCE limit).
- name: allowSubnetCidrRoutesOverlap
value: boolean
description: >
Optional. Defines the allowSubnetCidrRoutesOverlap field of the subnet, e.g. Available in alpha and beta according to [Compute API documentation](https://cloud.google.com/compute/docs/reference/rest/beta/subnetworks/insert)
- name: role
value: string
description: >
Optional. Defines the role field of the subnet, e.g. 'ACTIVE'. For information about the roles that can be set using this field, see [subnetwork](https://cloud.google.com/compute/docs/reference/rest/v1/subnetworks) in the Compute API documentation.
- name: internalRange
value: string
description: >
Optional. The url of an Internal Range. Eg: `projects//locations/global/internalRanges/`. If specified, it means that the subnetwork cidr will be created using the combination of requested_address/ip_prefix_length. Note that the subnet cidr has to be within the cidr range of this Internal Range.
- name: skipRequestedAddressValidation
value: boolean
description: >
Optional. Skips validating if the requested_address is in use by SN VPC’s peering group. Compute Engine will still perform this check and fail the request if the requested_address is in use. Note that Compute Engine does not check for the existence of dynamic routes when performing this check. Caller of this API should make sure that there are no dynamic routes overlapping with the requested_address/prefix_length IP address range otherwise the created subnet could cause misrouting.