generateConnectManifest method

Future<GenerateConnectManifestResponse> generateConnectManifest(
  1. String name, {
  2. String? imagePullSecretContent,
  3. bool? isUpgrade,
  4. String? namespace,
  5. String? proxy,
  6. String? registry,
  7. String? version,
  8. String? $fields,
})

Generates the manifest for deployment of the GKE connect agent.

This method is used internally by Google-provided libraries. Most clients should not need to call this method directly.

Request parameters:

name - Required. The Membership resource name the Agent will associate with, in the format projects / * /locations / * /memberships / * . Value must have pattern ^projects/\[^/\]+/locations/\[^/\]+/memberships/\[^/\]+$.

imagePullSecretContent - Optional. The image pull secret content for the registry, if not public.

isUpgrade - Optional. If true, generate the resources for upgrade only. Some resources generated only for installation (e.g. secrets) will be excluded.

namespace - Optional. Namespace for GKE Connect agent resources. Defaults to gke-connect. The Connect Agent is authorized automatically when run in the default namespace. Otherwise, explicit authorization must be granted with an additional IAM binding.

proxy - Optional. URI of a proxy if connectivity from the agent to gkeconnect.googleapis.com requires the use of a proxy. Format must be in the form http(s)://{proxy_address}, depending on the HTTP/HTTPS protocol supported by the proxy. This will direct the connect agent's outbound traffic through a HTTP(S) proxy.

registry - Optional. The registry to fetch the connect agent image from. Defaults to gcr.io/gkeconnect.

version - Optional. The Connect agent version to use. Defaults to the most current version.

$fields - Selector specifying which fields to include in a partial response.

Completes with a GenerateConnectManifestResponse.

Completes with a commons.ApiRequestError if the API endpoint returned an error.

If the used http.Client completes with an error when making a REST call, this method will complete with the same error.

Implementation

async.Future<GenerateConnectManifestResponse> generateConnectManifest(
  core.String name, {
  core.String? imagePullSecretContent,
  core.bool? isUpgrade,
  core.String? namespace,
  core.String? proxy,
  core.String? registry,
  core.String? version,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (imagePullSecretContent != null)
      'imagePullSecretContent': [imagePullSecretContent],
    if (isUpgrade != null) 'isUpgrade': ['${isUpgrade}'],
    if (namespace != null) 'namespace': [namespace],
    if (proxy != null) 'proxy': [proxy],
    if (registry != null) 'registry': [registry],
    if (version != null) 'version': [version],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ =
      'v1/' + core.Uri.encodeFull('$name') + ':generateConnectManifest';

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return GenerateConnectManifestResponse.fromJson(
      response_ as core.Map<core.String, core.dynamic>);
}