TokensApi
All URIs are relative to https://api.ionos.com/containerregistries
RegistriesTokensDelete
var result = RegistriesTokensDelete(ctx, registryId, tokenId)
.Execute()Delete token
Example
package main
import (
"context"
"fmt"
"os"
containerregistry "github.com/ionos-cloud/sdk-go-bundle/products/containerregistry"
"github.com/ionos-cloud/sdk-go-bundle/shared"
)
func main() {
registryId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the registry
tokenId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The unique ID of the token
configuration := shared.NewConfiguration("USERNAME", "PASSWORD", "TOKEN", "HOST_URL")
apiClient := containerregistry.NewAPIClient(configuration)
resp, err := apiClient.TokensApi.RegistriesTokensDelete(context.Background(), registryId, tokenId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `TokensApi.RegistriesTokensDelete``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", resp)
}
}Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
registryId
string
The unique ID of the registry
tokenId
string
The unique ID of the token
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesTokensDeleteRequest struct via the builder pattern
Name
Type
Description
Notes
Return type
(empty response body)
HTTP request headers
Content-Type: Not defined
Accept: application/json
RegistriesTokensFindById
Get token information
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
registryId
string
The unique ID of the registry
tokenId
string
The unique ID of the token
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesTokensFindByIdRequest struct via the builder pattern
Name
Type
Description
Notes
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
RegistriesTokensGet
List all tokens for the container registry
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
registryId
string
The unique ID of the registry
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesTokensGetRequest struct via the builder pattern
offset
string
The first element (from the complete list of the elements) to include in the response (used together with limit for pagination)
[default to "0"]
limit
string
The maximum number of elements to return (used together with offset for pagination)
[default to "100"]
Return type
HTTP request headers
Content-Type: Not defined
Accept: application/json
RegistriesTokensPatch
Update token
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
registryId
string
The unique ID of the registry
tokenId
string
The unique ID of the token
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesTokensPatchRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
RegistriesTokensPost
Create token
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
registryId
string
The unique ID of the registry
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesTokensPostRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
RegistriesTokensPut
Create or replace token
Example
Path Parameters
ctx
context.Context
context for authentication, logging, cancellation, deadlines, tracing, etc.
registryId
string
The unique ID of the registry
tokenId
string
The unique ID of the token
Other Parameters
Other parameters are passed through a pointer to an apiRegistriesTokensPutRequest struct via the builder pattern
Return type
HTTP request headers
Content-Type: application/json
Accept: application/json
Last updated
