• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5  margin: 0;
6  padding: 0;
7  border: 0;
8  font-weight: inherit;
9  font-style: inherit;
10  font-size: 100%;
11  font-family: inherit;
12  vertical-align: baseline;
13}
14
15body {
16  font-size: 13px;
17  padding: 1em;
18}
19
20h1 {
21  font-size: 26px;
22  margin-bottom: 1em;
23}
24
25h2 {
26  font-size: 24px;
27  margin-bottom: 1em;
28}
29
30h3 {
31  font-size: 20px;
32  margin-bottom: 1em;
33  margin-top: 1em;
34}
35
36pre, code {
37  line-height: 1.5;
38  font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42  margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46  font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50  border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54  margin-top: 0.5em;
55}
56
57.firstline {
58  margin-left: 2 em;
59}
60
61.method  {
62  margin-top: 1em;
63  border: solid 1px #CCC;
64  padding: 1em;
65  background: #EEE;
66}
67
68.details {
69  font-weight: bold;
70  font-size: 14px;
71}
72
73</style>
74
75<h1><a href="servicenetworking_v1.html">Service Networking API</a> . <a href="servicenetworking_v1.services.html">services</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
78  <code><a href="servicenetworking_v1.services.connections.html">connections()</a></code>
79</p>
80<p class="firstline">Returns the connections Resource.</p>
81
82<p class="toc_element">
83  <code><a href="#addSubnetwork">addSubnetwork(parent, body, x__xgafv=None)</a></code></p>
84<p class="firstline">For service producers, provisions a new subnet in a</p>
85<p class="toc_element">
86  <code><a href="#searchRange">searchRange(parent, body, x__xgafv=None)</a></code></p>
87<p class="firstline">Service producers can use this method to find a currently unused range</p>
88<h3>Method Details</h3>
89<div class="method">
90    <code class="details" id="addSubnetwork">addSubnetwork(parent, body, x__xgafv=None)</code>
91  <pre>For service producers, provisions a new subnet in a
92peered service's shared VPC network in the requested region and with the
93requested size that's expressed as a CIDR range (number of leading bits of
94ipV4 network mask). The method checks against the assigned allocated ranges
95to find a non-conflicting IP address range. The method will reuse a subnet
96if subsequent calls contain the same subnet name, region, and prefix
97length. This method will make producer's tenant project to be a shared VPC
98service project as needed. The response from the `get` operation will be of
99type `Subnetwork` if the operation successfully completes.
100
101Args:
102  parent: string, Required. A tenant project in the service producer organization, in the
103following format: services/{service}/{collection-id}/{resource-id}.
104{collection-id} is the cloud resource collection type that represents the
105tenant project. Only `projects` are supported.
106{resource-id} is the tenant project numeric id, such as
107`123456`. {service} the name of the peering service, such as
108`service-peering.example.com`. This service must already be
109enabled in the service consumer's project. (required)
110  body: object, The request body. (required)
111    The object takes the form of:
112
113{ # Request to create a subnetwork in a previously peered service network.
114    "description": "A String", # An optional description of the subnet.
115    "consumerNetwork": "A String", # Required. The name of the service consumer's VPC network. The network
116        # must have an existing private connection that was provisioned through the
117        # connections.create method. The name must be in the following format:
118        # `projects/{project}/global/networks/{network}`, where {project}
119        # is a project number, such as `12345`. {network} is the name of a
120        # VPC network in the project.
121    "region": "A String", # Required. The name of a [region](/compute/docs/regions-zones)
122        # for the subnet, such `europe-west1`.
123    "requestedAddress": "A String", # Optional. The starting address of a range. The address must be a valid
124        # IPv4 address in the x.x.x.x format. This value combined with the IP prefix
125        # range is the CIDR range for the subnet. The range must be within the
126        # allocated range that is assigned to the private connection. If the CIDR
127        # range isn't available, the call fails.
128    "ipPrefixLength": 42, # Required. The prefix length of the subnet's IP address range.  Use CIDR
129        # range notation, such as `30` to provision a subnet with an
130        # `x.x.x.x/30` CIDR range. The IP address range is drawn from a
131        # pool of available ranges in the service consumer's allocated range.
132    "subnetwork": "A String", # Required. A name for the new subnet. For information about the naming
133        # requirements, see [subnetwork](/compute/docs/reference/rest/v1/subnetworks)
134        # in the Compute API documentation.
135    "consumer": "A String", # Required. A resource that represents the service consumer, such as
136        # `projects/123456`. The project number can be different from the
137        # value in the consumer network parameter. For example, the network might be
138        # part of a Shared VPC network. In those cases, Service Networking validates
139        # that this resource belongs to that Shared VPC.
140    "subnetworkUsers": [ # A list of members that are granted the `compute.networkUser`
141        # role on the subnet.
142      "A String",
143    ],
144  }
145
146  x__xgafv: string, V1 error format.
147    Allowed values
148      1 - v1 error format
149      2 - v2 error format
150
151Returns:
152  An object of the form:
153
154    { # This resource represents a long-running operation that is the result of a
155      # network API call.
156    "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
157        # different programming environments, including REST APIs and RPC APIs. It is
158        # used by [gRPC](https://github.com/grpc). Each `Status` message contains
159        # three pieces of data: error code, error message, and error details.
160        #
161        # You can find out more about this error model and how to work with it in the
162        # [API Design Guide](https://cloud.google.com/apis/design/errors).
163      "message": "A String", # A developer-facing error message, which should be in English. Any
164          # user-facing error message should be localized and sent in the
165          # google.rpc.Status.details field, or localized by the client.
166      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
167      "details": [ # A list of messages that carry the error details.  There is a common set of
168          # message types for APIs to use.
169        {
170          "a_key": "", # Properties of the object. Contains field @type with type URL.
171        },
172      ],
173    },
174    "done": True or False, # If the value is `false`, it means the operation is still in progress.
175        # If `true`, the operation is completed, and either `error` or `response` is
176        # available.
177    "response": { # The normal response of the operation in case of success.  If the original
178        # method returns no data on success, such as `Delete`, the response is
179        # `google.protobuf.Empty`.  If the original method is standard
180        # `Get`/`Create`/`Update`, the response should be the resource.  For other
181        # methods, the response should have the type `XxxResponse`, where `Xxx`
182        # is the original method name.  For example, if the original method name
183        # is `TakeSnapshot()`, the inferred response type is
184        # `TakeSnapshotResponse`.
185      "a_key": "", # Properties of the object. Contains field @type with type URL.
186    },
187    "name": "A String", # The server-assigned name, which is only unique within the same service that
188        # originally returns it. If you use the default HTTP mapping, the
189        # `name` should be a resource name ending with `operations/{unique_id}`.
190    "metadata": { # Service-specific metadata associated with the operation.  It typically
191        # contains progress information and common metadata such as create time.
192        # Some services might not provide such metadata.  Any method that returns a
193        # long-running operation should document the metadata type, if any.
194      "a_key": "", # Properties of the object. Contains field @type with type URL.
195    },
196  }</pre>
197</div>
198
199<div class="method">
200    <code class="details" id="searchRange">searchRange(parent, body, x__xgafv=None)</code>
201  <pre>Service producers can use this method to find a currently unused range
202within consumer allocated ranges.   This returned range is not reserved,
203and not guaranteed to remain unused.
204It will validate previously provided allocated ranges, find
205non-conflicting sub-range of requested size (expressed in
206number of leading bits of ipv4 network mask, as in CIDR range
207notation).
208Operation<response: Range>
209
210Args:
211  parent: string, Required. This is in a form services/{service}.
212{service} the name of the private access management service, for example
213'service-peering.example.com'. (required)
214  body: object, The request body. (required)
215    The object takes the form of:
216
217{ # Request to search for an unused range within allocated ranges.
218    "ipPrefixLength": 42, # Required. The prefix length of the IP range.
219        # Use usual CIDR range notation.
220        # For example, '30' to find unused x.x.x.x/30 CIDR range.
221        # Actual range will be determined using allocated range for the consumer
222        # peered network and returned in the result.
223    "network": "A String", # Network name in the consumer project.   This network must have been
224        # already peered with a shared VPC network using CreateConnection
225        # method.
226        # Must be in a form 'projects/{project}/global/networks/{network}'.
227        # {project} is a project number, as in '12345'
228        # {network} is network name.
229  }
230
231  x__xgafv: string, V1 error format.
232    Allowed values
233      1 - v1 error format
234      2 - v2 error format
235
236Returns:
237  An object of the form:
238
239    { # This resource represents a long-running operation that is the result of a
240      # network API call.
241    "error": { # The `Status` type defines a logical error model that is suitable for # The error result of the operation in case of failure or cancellation.
242        # different programming environments, including REST APIs and RPC APIs. It is
243        # used by [gRPC](https://github.com/grpc). Each `Status` message contains
244        # three pieces of data: error code, error message, and error details.
245        #
246        # You can find out more about this error model and how to work with it in the
247        # [API Design Guide](https://cloud.google.com/apis/design/errors).
248      "message": "A String", # A developer-facing error message, which should be in English. Any
249          # user-facing error message should be localized and sent in the
250          # google.rpc.Status.details field, or localized by the client.
251      "code": 42, # The status code, which should be an enum value of google.rpc.Code.
252      "details": [ # A list of messages that carry the error details.  There is a common set of
253          # message types for APIs to use.
254        {
255          "a_key": "", # Properties of the object. Contains field @type with type URL.
256        },
257      ],
258    },
259    "done": True or False, # If the value is `false`, it means the operation is still in progress.
260        # If `true`, the operation is completed, and either `error` or `response` is
261        # available.
262    "response": { # The normal response of the operation in case of success.  If the original
263        # method returns no data on success, such as `Delete`, the response is
264        # `google.protobuf.Empty`.  If the original method is standard
265        # `Get`/`Create`/`Update`, the response should be the resource.  For other
266        # methods, the response should have the type `XxxResponse`, where `Xxx`
267        # is the original method name.  For example, if the original method name
268        # is `TakeSnapshot()`, the inferred response type is
269        # `TakeSnapshotResponse`.
270      "a_key": "", # Properties of the object. Contains field @type with type URL.
271    },
272    "name": "A String", # The server-assigned name, which is only unique within the same service that
273        # originally returns it. If you use the default HTTP mapping, the
274        # `name` should be a resource name ending with `operations/{unique_id}`.
275    "metadata": { # Service-specific metadata associated with the operation.  It typically
276        # contains progress information and common metadata such as create time.
277        # Some services might not provide such metadata.  Any method that returns a
278        # long-running operation should document the metadata type, if any.
279      "a_key": "", # Properties of the object. Contains field @type with type URL.
280    },
281  }</pre>
282</div>
283
284</body></html>