ibmcloudcodeenginev1

package
v0.0.0-...-8ff83cd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 3, 2025 License: Apache-2.0 Imports: 4 Imported by: 2

Documentation

Overview

Package ibmcloudcodeenginev1 : Operations and models for the IbmCloudCodeEngineV1 service

Index

Constants

View Source
const DefaultServiceName = "ibm_cloud_code_engine"

DefaultServiceName is the default key used to find external configuration information.

View Source
const DefaultServiceURL = "https://ibm-cloud-code-engine.cloud.ibm.com/api/v1"

DefaultServiceURL is the default URL to make service requests to.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetKubeconfigOptions

type GetKubeconfigOptions struct {
	// This IAM Delegated Refresh Token is specifically valid for Code Engine. Generate this token with the [Create an IAM
	// access token and delegated refresh token for a user or service
	// ID](https://cloud.ibm.com/apidocs/iam-identity-token-api#gettoken-apikey-delegatedrefreshtoken) API. Specify the
	// `receiver_client_ids` value to be `ce` and the `delegated_refresh_token_expiry` value to be `3600`.
	XDelegatedRefreshToken *string `json:"X-Delegated-Refresh-Token" validate:"required"`

	// The id of the IBM Cloud Code Engine project.
	ID *string `json:"id" validate:"required,ne="`

	// The type of the response: text/plain or application/json. A character encoding can be specified by including a
	// `charset` parameter. For example, 'text/plain;charset=utf-8'.
	Accept *string `json:"Accept,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

GetKubeconfigOptions : The GetKubeconfig options.

func (*GetKubeconfigOptions) SetAccept

func (options *GetKubeconfigOptions) SetAccept(accept string) *GetKubeconfigOptions

SetAccept : Allow user to set Accept

func (*GetKubeconfigOptions) SetHeaders

func (options *GetKubeconfigOptions) SetHeaders(param map[string]string) *GetKubeconfigOptions

SetHeaders : Allow user to set Headers

func (*GetKubeconfigOptions) SetID

func (options *GetKubeconfigOptions) SetID(id string) *GetKubeconfigOptions

SetID : Allow user to set ID

func (*GetKubeconfigOptions) SetXDelegatedRefreshToken

func (options *GetKubeconfigOptions) SetXDelegatedRefreshToken(xDelegatedRefreshToken string) *GetKubeconfigOptions

SetXDelegatedRefreshToken : Allow user to set XDelegatedRefreshToken

type IbmCloudCodeEngineV1

type IbmCloudCodeEngineV1 struct {
	Service *core.BaseService
}

IbmCloudCodeEngineV1 : The purpose is to provide an API to get Kubeconfig file for IBM Cloud Code Engine Project

Version: 0.0

func NewIbmCloudCodeEngineV1

func NewIbmCloudCodeEngineV1(options *IbmCloudCodeEngineV1Options) (service *IbmCloudCodeEngineV1, err error)

NewIbmCloudCodeEngineV1 : constructs an instance of IbmCloudCodeEngineV1 with passed in options.

func NewIbmCloudCodeEngineV1UsingExternalConfig

func NewIbmCloudCodeEngineV1UsingExternalConfig(options *IbmCloudCodeEngineV1Options) (ibmCloudCodeEngine *IbmCloudCodeEngineV1, err error)

NewIbmCloudCodeEngineV1UsingExternalConfig : constructs an instance of IbmCloudCodeEngineV1 with passed in options and external configuration.

func (*IbmCloudCodeEngineV1) GetEnableGzipCompression

func (ibmCloudCodeEngine *IbmCloudCodeEngineV1) GetEnableGzipCompression() bool

GetEnableGzipCompression returns the service's EnableGzipCompression field

func (*IbmCloudCodeEngineV1) GetKubeconfig

func (ibmCloudCodeEngine *IbmCloudCodeEngineV1) GetKubeconfig(getKubeconfigOptions *GetKubeconfigOptions) (result *string, response *core.DetailedResponse, err error)

GetKubeconfig : Retrieve KUBECONFIG for a specified project Returns the KUBECONFIG, similar to the output of `kubectl config view --minify=true`. There are 2 tokens in the Request Header and a query parameter that you must provide.

These values can be generated as follows: 1. Auth Header Pass the generated IAM Token as the Authorization header

from the CLI as `token=cat $HOME/.bluemix/config.json | jq .IAMToken -r`. Generate the token with the [Create an IAM access token for a user or service ID using an API key](https://cloud.ibm.com/apidocs/iam-identity-token-api#gettoken-apikey) API.

2. X-Delegated-Refresh-Token Header Generate an IAM Delegated Refresh Token for Code Engine with the [Create an IAM access token and delegated refresh token for a user or service ID](https://cloud.ibm.com/apidocs/iam-identity-token-api#gettoken-apikey-delegatedrefreshtoken) API. Specify the `receiver_client_ids` value to be `ce` and the `delegated_refresh_token_expiry` value to be `3600`.

3. Project ID In order to retrieve the Kubeconfig file for a specific Code Engine project, use the CLI to extract the ID `id=ibmcloud ce project get -n ${CE_PROJECT_NAME} -o jsonpath={.guid}` You must be logged into the account where the project was created to retrieve the ID.

func (*IbmCloudCodeEngineV1) GetKubeconfigWithContext

func (ibmCloudCodeEngine *IbmCloudCodeEngineV1) GetKubeconfigWithContext(ctx context.Context, getKubeconfigOptions *GetKubeconfigOptions) (result *string, response *core.DetailedResponse, err error)

GetKubeconfigWithContext is an alternate form of the GetKubeconfig method which supports a Context parameter

func (*IbmCloudCodeEngineV1) GetServiceURL

func (ibmCloudCodeEngine *IbmCloudCodeEngineV1) GetServiceURL() string

GetServiceURL returns the service URL

func (*IbmCloudCodeEngineV1) ListKubeconfig

func (ibmCloudCodeEngine *IbmCloudCodeEngineV1) ListKubeconfig(listKubeconfigOptions *ListKubeconfigOptions) (result *string, response *core.DetailedResponse, err error)

ListKubeconfig : Deprecated soon: Retrieve KUBECONFIG for a specified project **Deprecated soon**: This API will be deprecated soon. Use the [GET /project/{id}/config](#get-kubeconfig) API instead. Returns the KUBECONFIG file, similar to the output of `kubectl config view --minify=true`.

func (*IbmCloudCodeEngineV1) ListKubeconfigWithContext

func (ibmCloudCodeEngine *IbmCloudCodeEngineV1) ListKubeconfigWithContext(ctx context.Context, listKubeconfigOptions *ListKubeconfigOptions) (result *string, response *core.DetailedResponse, err error)

ListKubeconfigWithContext is an alternate form of the ListKubeconfig method which supports a Context parameter

func (*IbmCloudCodeEngineV1) NewGetKubeconfigOptions

func (*IbmCloudCodeEngineV1) NewGetKubeconfigOptions(xDelegatedRefreshToken string, id string) *GetKubeconfigOptions

NewGetKubeconfigOptions : Instantiate GetKubeconfigOptions

func (*IbmCloudCodeEngineV1) NewListKubeconfigOptions

func (*IbmCloudCodeEngineV1) NewListKubeconfigOptions(refreshToken string, id string) *ListKubeconfigOptions

NewListKubeconfigOptions : Instantiate ListKubeconfigOptions

func (*IbmCloudCodeEngineV1) SetEnableGzipCompression

func (ibmCloudCodeEngine *IbmCloudCodeEngineV1) SetEnableGzipCompression(enableGzip bool)

SetEnableGzipCompression sets the service's EnableGzipCompression field

func (*IbmCloudCodeEngineV1) SetServiceURL

func (ibmCloudCodeEngine *IbmCloudCodeEngineV1) SetServiceURL(url string) error

SetServiceURL sets the service URL

type IbmCloudCodeEngineV1Options

type IbmCloudCodeEngineV1Options struct {
	ServiceName   string
	URL           string
	Authenticator core.Authenticator
}

IbmCloudCodeEngineV1Options : Service options

type ListKubeconfigOptions

type ListKubeconfigOptions struct {
	// The IAM Refresh token associated with the IBM Cloud account. To retrieve your IAM token, run `ibmcloud iam
	// oauth-tokens`.
	RefreshToken *string `json:"Refresh-Token" validate:"required"`

	// The id of the IBM Cloud Code Engine project. To retrieve your project ID, run `ibmcloud ce project get -n
	// <PROJECT_NAME>`.
	ID *string `json:"id" validate:"required,ne="`

	// The type of the response: text/plain or application/json. A character encoding can be specified by including a
	// `charset` parameter. For example, 'text/plain;charset=utf-8'.
	Accept *string `json:"Accept,omitempty"`

	// Allows users to set headers on API requests
	Headers map[string]string
}

ListKubeconfigOptions : The ListKubeconfig options.

func (*ListKubeconfigOptions) SetAccept

func (options *ListKubeconfigOptions) SetAccept(accept string) *ListKubeconfigOptions

SetAccept : Allow user to set Accept

func (*ListKubeconfigOptions) SetHeaders

func (options *ListKubeconfigOptions) SetHeaders(param map[string]string) *ListKubeconfigOptions

SetHeaders : Allow user to set Headers

func (*ListKubeconfigOptions) SetID

SetID : Allow user to set ID

func (*ListKubeconfigOptions) SetRefreshToken

func (options *ListKubeconfigOptions) SetRefreshToken(refreshToken string) *ListKubeconfigOptions

SetRefreshToken : Allow user to set RefreshToken

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL