Documentation ¶
Index ¶
- type AddKeyPairDefault
- type AddKeyPairOK
- type AddKeyPairParams
- func (o *AddKeyPairParams) SetBody(body *models.V4AddKeyPairRequest)
- func (o *AddKeyPairParams) SetClusterID(clusterID string)
- func (o *AddKeyPairParams) SetContext(ctx context.Context)
- func (o *AddKeyPairParams) SetHTTPClient(client *http.Client)
- func (o *AddKeyPairParams) SetTimeout(timeout time.Duration)
- func (o *AddKeyPairParams) SetXGiantSwarmActivity(xGiantSwarmActivity *string)
- func (o *AddKeyPairParams) SetXGiantSwarmCmdLine(xGiantSwarmCmdLine *string)
- func (o *AddKeyPairParams) SetXRequestID(xRequestID *string)
- func (o *AddKeyPairParams) WithBody(body *models.V4AddKeyPairRequest) *AddKeyPairParams
- func (o *AddKeyPairParams) WithClusterID(clusterID string) *AddKeyPairParams
- func (o *AddKeyPairParams) WithContext(ctx context.Context) *AddKeyPairParams
- func (o *AddKeyPairParams) WithHTTPClient(client *http.Client) *AddKeyPairParams
- func (o *AddKeyPairParams) WithTimeout(timeout time.Duration) *AddKeyPairParams
- func (o *AddKeyPairParams) WithXGiantSwarmActivity(xGiantSwarmActivity *string) *AddKeyPairParams
- func (o *AddKeyPairParams) WithXGiantSwarmCmdLine(xGiantSwarmCmdLine *string) *AddKeyPairParams
- func (o *AddKeyPairParams) WithXRequestID(xRequestID *string) *AddKeyPairParams
- func (o *AddKeyPairParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type AddKeyPairReader
- type AddKeyPairServiceUnavailable
- type AddKeyPairUnauthorized
- type Client
- type GetKeyPairsDefault
- type GetKeyPairsOK
- type GetKeyPairsParams
- func (o *GetKeyPairsParams) SetClusterID(clusterID string)
- func (o *GetKeyPairsParams) SetContext(ctx context.Context)
- func (o *GetKeyPairsParams) SetHTTPClient(client *http.Client)
- func (o *GetKeyPairsParams) SetTimeout(timeout time.Duration)
- func (o *GetKeyPairsParams) SetXGiantSwarmActivity(xGiantSwarmActivity *string)
- func (o *GetKeyPairsParams) SetXGiantSwarmCmdLine(xGiantSwarmCmdLine *string)
- func (o *GetKeyPairsParams) SetXRequestID(xRequestID *string)
- func (o *GetKeyPairsParams) WithClusterID(clusterID string) *GetKeyPairsParams
- func (o *GetKeyPairsParams) WithContext(ctx context.Context) *GetKeyPairsParams
- func (o *GetKeyPairsParams) WithHTTPClient(client *http.Client) *GetKeyPairsParams
- func (o *GetKeyPairsParams) WithTimeout(timeout time.Duration) *GetKeyPairsParams
- func (o *GetKeyPairsParams) WithXGiantSwarmActivity(xGiantSwarmActivity *string) *GetKeyPairsParams
- func (o *GetKeyPairsParams) WithXGiantSwarmCmdLine(xGiantSwarmCmdLine *string) *GetKeyPairsParams
- func (o *GetKeyPairsParams) WithXRequestID(xRequestID *string) *GetKeyPairsParams
- func (o *GetKeyPairsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
- type GetKeyPairsReader
- type GetKeyPairsUnauthorized
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddKeyPairDefault ¶
type AddKeyPairDefault struct { Payload *models.V4GenericResponse // contains filtered or unexported fields }
AddKeyPairDefault handles this case with default header values.
error
func NewAddKeyPairDefault ¶
func NewAddKeyPairDefault(code int) *AddKeyPairDefault
NewAddKeyPairDefault creates a AddKeyPairDefault with default headers values
func (*AddKeyPairDefault) Code ¶
func (o *AddKeyPairDefault) Code() int
Code gets the status code for the add key pair default response
func (*AddKeyPairDefault) Error ¶
func (o *AddKeyPairDefault) Error() string
type AddKeyPairOK ¶
type AddKeyPairOK struct {
Payload *models.V4AddKeyPairResponse
}
AddKeyPairOK handles this case with default header values.
Success
func NewAddKeyPairOK ¶
func NewAddKeyPairOK() *AddKeyPairOK
NewAddKeyPairOK creates a AddKeyPairOK with default headers values
func (*AddKeyPairOK) Error ¶
func (o *AddKeyPairOK) Error() string
type AddKeyPairParams ¶
type AddKeyPairParams struct { /*XGiantSwarmActivity Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. */ XGiantSwarmActivity *string /*XGiantSwarmCmdLine If activity has been issued by a CLI, this header can contain the command line */ XGiantSwarmCmdLine *string /*XRequestID A randomly generated key that can be used to track a request throughout services of Giant Swarm. */ XRequestID *string /*Body While the `ttl_hours` attribute is optional and will be set to a default value when omitted, the `description` is mandatory. */ Body *models.V4AddKeyPairRequest /*ClusterID Cluster ID */ ClusterID string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
AddKeyPairParams contains all the parameters to send to the API endpoint for the add key pair operation typically these are written to a http.Request
func NewAddKeyPairParams ¶
func NewAddKeyPairParams() *AddKeyPairParams
NewAddKeyPairParams creates a new AddKeyPairParams object with the default values initialized.
func NewAddKeyPairParamsWithContext ¶
func NewAddKeyPairParamsWithContext(ctx context.Context) *AddKeyPairParams
NewAddKeyPairParamsWithContext creates a new AddKeyPairParams object with the default values initialized, and the ability to set a context for a request
func NewAddKeyPairParamsWithHTTPClient ¶
func NewAddKeyPairParamsWithHTTPClient(client *http.Client) *AddKeyPairParams
NewAddKeyPairParamsWithHTTPClient creates a new AddKeyPairParams object with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewAddKeyPairParamsWithTimeout ¶
func NewAddKeyPairParamsWithTimeout(timeout time.Duration) *AddKeyPairParams
NewAddKeyPairParamsWithTimeout creates a new AddKeyPairParams object with the default values initialized, and the ability to set a timeout on a request
func (*AddKeyPairParams) SetBody ¶
func (o *AddKeyPairParams) SetBody(body *models.V4AddKeyPairRequest)
SetBody adds the body to the add key pair params
func (*AddKeyPairParams) SetClusterID ¶
func (o *AddKeyPairParams) SetClusterID(clusterID string)
SetClusterID adds the clusterId to the add key pair params
func (*AddKeyPairParams) SetContext ¶
func (o *AddKeyPairParams) SetContext(ctx context.Context)
SetContext adds the context to the add key pair params
func (*AddKeyPairParams) SetHTTPClient ¶
func (o *AddKeyPairParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the add key pair params
func (*AddKeyPairParams) SetTimeout ¶
func (o *AddKeyPairParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the add key pair params
func (*AddKeyPairParams) SetXGiantSwarmActivity ¶
func (o *AddKeyPairParams) SetXGiantSwarmActivity(xGiantSwarmActivity *string)
SetXGiantSwarmActivity adds the xGiantSwarmActivity to the add key pair params
func (*AddKeyPairParams) SetXGiantSwarmCmdLine ¶
func (o *AddKeyPairParams) SetXGiantSwarmCmdLine(xGiantSwarmCmdLine *string)
SetXGiantSwarmCmdLine adds the xGiantSwarmCmdLine to the add key pair params
func (*AddKeyPairParams) SetXRequestID ¶
func (o *AddKeyPairParams) SetXRequestID(xRequestID *string)
SetXRequestID adds the xRequestId to the add key pair params
func (*AddKeyPairParams) WithBody ¶
func (o *AddKeyPairParams) WithBody(body *models.V4AddKeyPairRequest) *AddKeyPairParams
WithBody adds the body to the add key pair params
func (*AddKeyPairParams) WithClusterID ¶
func (o *AddKeyPairParams) WithClusterID(clusterID string) *AddKeyPairParams
WithClusterID adds the clusterID to the add key pair params
func (*AddKeyPairParams) WithContext ¶
func (o *AddKeyPairParams) WithContext(ctx context.Context) *AddKeyPairParams
WithContext adds the context to the add key pair params
func (*AddKeyPairParams) WithHTTPClient ¶
func (o *AddKeyPairParams) WithHTTPClient(client *http.Client) *AddKeyPairParams
WithHTTPClient adds the HTTPClient to the add key pair params
func (*AddKeyPairParams) WithTimeout ¶
func (o *AddKeyPairParams) WithTimeout(timeout time.Duration) *AddKeyPairParams
WithTimeout adds the timeout to the add key pair params
func (*AddKeyPairParams) WithXGiantSwarmActivity ¶
func (o *AddKeyPairParams) WithXGiantSwarmActivity(xGiantSwarmActivity *string) *AddKeyPairParams
WithXGiantSwarmActivity adds the xGiantSwarmActivity to the add key pair params
func (*AddKeyPairParams) WithXGiantSwarmCmdLine ¶
func (o *AddKeyPairParams) WithXGiantSwarmCmdLine(xGiantSwarmCmdLine *string) *AddKeyPairParams
WithXGiantSwarmCmdLine adds the xGiantSwarmCmdLine to the add key pair params
func (*AddKeyPairParams) WithXRequestID ¶
func (o *AddKeyPairParams) WithXRequestID(xRequestID *string) *AddKeyPairParams
WithXRequestID adds the xRequestID to the add key pair params
func (*AddKeyPairParams) WriteToRequest ¶
func (o *AddKeyPairParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type AddKeyPairReader ¶
type AddKeyPairReader struct {
// contains filtered or unexported fields
}
AddKeyPairReader is a Reader for the AddKeyPair structure.
func (*AddKeyPairReader) ReadResponse ¶
func (o *AddKeyPairReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type AddKeyPairServiceUnavailable ¶
type AddKeyPairServiceUnavailable struct {
}AddKeyPairServiceUnavailable handles this case with default header values.
Not yet available
func NewAddKeyPairServiceUnavailable ¶
func NewAddKeyPairServiceUnavailable() *AddKeyPairServiceUnavailable
NewAddKeyPairServiceUnavailable creates a AddKeyPairServiceUnavailable with default headers values
func (*AddKeyPairServiceUnavailable) Error ¶
func (o *AddKeyPairServiceUnavailable) Error() string
type AddKeyPairUnauthorized ¶
type AddKeyPairUnauthorized struct {
}AddKeyPairUnauthorized handles this case with default header values.
Permission denied
func NewAddKeyPairUnauthorized ¶
func NewAddKeyPairUnauthorized() *AddKeyPairUnauthorized
NewAddKeyPairUnauthorized creates a AddKeyPairUnauthorized with default headers values
func (*AddKeyPairUnauthorized) Error ¶
func (o *AddKeyPairUnauthorized) Error() string
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for key pairs API
func New ¶
func New(transport runtime.ClientTransport, formats strfmt.Registry) *Client
New creates a new key pairs API client.
func (*Client) AddKeyPair ¶
func (a *Client) AddKeyPair(params *AddKeyPairParams, authInfo runtime.ClientAuthInfoWriter) (*AddKeyPairOK, error)
AddKeyPair creates key pair
This operation allows to create a new key pair for accessing a specific cluster.
A key pair consists of an unencrypted private RSA key and an X.509 certificate. In addition, when obtaining a key pair for a cluster, the cluster's certificate authority file (CA certificate) is delivered, which is required by TLS clients to establish trust to the cluster.
In addition to the credentials itself, a key pair has some metadata like a unique ID, a creation timestamp and a free text `description` that you can use at will, for example to note for whom a key pair has been issued.
After creation of a workload cluster, it might take a couple of seconds before this operation can be performed successfully. In this case, the API will respond with code 503, indicating that you should retry the call after some wait time.
### Customizing the certificate's subject for K8s RBAC
It is possible to set the Common Name and Organization fields of the generated certificate's subject.
- `cn_prefix`: The certificate's common name uses this format: `<cn_prefix>.user.<clusterdomain>`.
`clusterdomain` is specific to your cluster and is not editable. The `cn_prefix` however is editable. When left blank it will default to the email address of the Giant Swarm user that is performing the create key pair request. The common name is used as the username for requests to the Kubernetes API. This allows you to set up role-based access controls.
- `certificate_organizations`: This will set the certificate's `organization` fields. Use a comma separated list of values. The Kubernetes API will use these values as group memberships.
__Note:__ The actual credentials coming with the key pair (key, certificate) can only be accessed once, as the result of the `POST` request that triggers their creation. This restriction exists to minimize the risk of credentials being leaked. If you fail to capture the credentials upon creation, you'll have to repeat the creation request.
func (*Client) GetKeyPairs ¶
func (a *Client) GetKeyPairs(params *GetKeyPairsParams, authInfo runtime.ClientAuthInfoWriter) (*GetKeyPairsOK, error)
GetKeyPairs gets key pairs
Returns a list of information on all key pairs of a cluster as an array.
The individual array items contain metadata on the key pairs, but neither the key nor the certificate. These can only be obtained upon creation, using the [addKeypair](#operation/addKeyPair) operation.
func (*Client) SetTransport ¶
func (a *Client) SetTransport(transport runtime.ClientTransport)
SetTransport changes the transport on the client
type GetKeyPairsDefault ¶
type GetKeyPairsDefault struct { Payload *models.V4GenericResponse // contains filtered or unexported fields }
GetKeyPairsDefault handles this case with default header values.
error
func NewGetKeyPairsDefault ¶
func NewGetKeyPairsDefault(code int) *GetKeyPairsDefault
NewGetKeyPairsDefault creates a GetKeyPairsDefault with default headers values
func (*GetKeyPairsDefault) Code ¶
func (o *GetKeyPairsDefault) Code() int
Code gets the status code for the get key pairs default response
func (*GetKeyPairsDefault) Error ¶
func (o *GetKeyPairsDefault) Error() string
type GetKeyPairsOK ¶
type GetKeyPairsOK struct {
Payload models.V4GetKeyPairsResponse
}
GetKeyPairsOK handles this case with default header values.
Key pairs
func NewGetKeyPairsOK ¶
func NewGetKeyPairsOK() *GetKeyPairsOK
NewGetKeyPairsOK creates a GetKeyPairsOK with default headers values
func (*GetKeyPairsOK) Error ¶
func (o *GetKeyPairsOK) Error() string
type GetKeyPairsParams ¶
type GetKeyPairsParams struct { /*XGiantSwarmActivity Name of an activity to track, like "list-clusters". This allows to analyze several API requests sent in context and gives an idea on the purpose. */ XGiantSwarmActivity *string /*XGiantSwarmCmdLine If activity has been issued by a CLI, this header can contain the command line */ XGiantSwarmCmdLine *string /*XRequestID A randomly generated key that can be used to track a request throughout services of Giant Swarm. */ XRequestID *string /*ClusterID Cluster ID */ ClusterID string Context context.Context HTTPClient *http.Client // contains filtered or unexported fields }
GetKeyPairsParams contains all the parameters to send to the API endpoint for the get key pairs operation typically these are written to a http.Request
func NewGetKeyPairsParams ¶
func NewGetKeyPairsParams() *GetKeyPairsParams
NewGetKeyPairsParams creates a new GetKeyPairsParams object with the default values initialized.
func NewGetKeyPairsParamsWithContext ¶
func NewGetKeyPairsParamsWithContext(ctx context.Context) *GetKeyPairsParams
NewGetKeyPairsParamsWithContext creates a new GetKeyPairsParams object with the default values initialized, and the ability to set a context for a request
func NewGetKeyPairsParamsWithHTTPClient ¶
func NewGetKeyPairsParamsWithHTTPClient(client *http.Client) *GetKeyPairsParams
NewGetKeyPairsParamsWithHTTPClient creates a new GetKeyPairsParams object with the default values initialized, and the ability to set a custom HTTPClient for a request
func NewGetKeyPairsParamsWithTimeout ¶
func NewGetKeyPairsParamsWithTimeout(timeout time.Duration) *GetKeyPairsParams
NewGetKeyPairsParamsWithTimeout creates a new GetKeyPairsParams object with the default values initialized, and the ability to set a timeout on a request
func (*GetKeyPairsParams) SetClusterID ¶
func (o *GetKeyPairsParams) SetClusterID(clusterID string)
SetClusterID adds the clusterId to the get key pairs params
func (*GetKeyPairsParams) SetContext ¶
func (o *GetKeyPairsParams) SetContext(ctx context.Context)
SetContext adds the context to the get key pairs params
func (*GetKeyPairsParams) SetHTTPClient ¶
func (o *GetKeyPairsParams) SetHTTPClient(client *http.Client)
SetHTTPClient adds the HTTPClient to the get key pairs params
func (*GetKeyPairsParams) SetTimeout ¶
func (o *GetKeyPairsParams) SetTimeout(timeout time.Duration)
SetTimeout adds the timeout to the get key pairs params
func (*GetKeyPairsParams) SetXGiantSwarmActivity ¶
func (o *GetKeyPairsParams) SetXGiantSwarmActivity(xGiantSwarmActivity *string)
SetXGiantSwarmActivity adds the xGiantSwarmActivity to the get key pairs params
func (*GetKeyPairsParams) SetXGiantSwarmCmdLine ¶
func (o *GetKeyPairsParams) SetXGiantSwarmCmdLine(xGiantSwarmCmdLine *string)
SetXGiantSwarmCmdLine adds the xGiantSwarmCmdLine to the get key pairs params
func (*GetKeyPairsParams) SetXRequestID ¶
func (o *GetKeyPairsParams) SetXRequestID(xRequestID *string)
SetXRequestID adds the xRequestId to the get key pairs params
func (*GetKeyPairsParams) WithClusterID ¶
func (o *GetKeyPairsParams) WithClusterID(clusterID string) *GetKeyPairsParams
WithClusterID adds the clusterID to the get key pairs params
func (*GetKeyPairsParams) WithContext ¶
func (o *GetKeyPairsParams) WithContext(ctx context.Context) *GetKeyPairsParams
WithContext adds the context to the get key pairs params
func (*GetKeyPairsParams) WithHTTPClient ¶
func (o *GetKeyPairsParams) WithHTTPClient(client *http.Client) *GetKeyPairsParams
WithHTTPClient adds the HTTPClient to the get key pairs params
func (*GetKeyPairsParams) WithTimeout ¶
func (o *GetKeyPairsParams) WithTimeout(timeout time.Duration) *GetKeyPairsParams
WithTimeout adds the timeout to the get key pairs params
func (*GetKeyPairsParams) WithXGiantSwarmActivity ¶
func (o *GetKeyPairsParams) WithXGiantSwarmActivity(xGiantSwarmActivity *string) *GetKeyPairsParams
WithXGiantSwarmActivity adds the xGiantSwarmActivity to the get key pairs params
func (*GetKeyPairsParams) WithXGiantSwarmCmdLine ¶
func (o *GetKeyPairsParams) WithXGiantSwarmCmdLine(xGiantSwarmCmdLine *string) *GetKeyPairsParams
WithXGiantSwarmCmdLine adds the xGiantSwarmCmdLine to the get key pairs params
func (*GetKeyPairsParams) WithXRequestID ¶
func (o *GetKeyPairsParams) WithXRequestID(xRequestID *string) *GetKeyPairsParams
WithXRequestID adds the xRequestID to the get key pairs params
func (*GetKeyPairsParams) WriteToRequest ¶
func (o *GetKeyPairsParams) WriteToRequest(r runtime.ClientRequest, reg strfmt.Registry) error
WriteToRequest writes these params to a swagger request
type GetKeyPairsReader ¶
type GetKeyPairsReader struct {
// contains filtered or unexported fields
}
GetKeyPairsReader is a Reader for the GetKeyPairs structure.
func (*GetKeyPairsReader) ReadResponse ¶
func (o *GetKeyPairsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)
ReadResponse reads a server response into the received o.
type GetKeyPairsUnauthorized ¶
type GetKeyPairsUnauthorized struct {
}GetKeyPairsUnauthorized handles this case with default header values.
Permission denied
func NewGetKeyPairsUnauthorized ¶
func NewGetKeyPairsUnauthorized() *GetKeyPairsUnauthorized
NewGetKeyPairsUnauthorized creates a GetKeyPairsUnauthorized with default headers values
func (*GetKeyPairsUnauthorized) Error ¶
func (o *GetKeyPairsUnauthorized) Error() string