Skip to content

Latest commit

 

History

History
100 lines (69 loc) · 3.64 KB

File metadata and controls

100 lines (69 loc) · 3.64 KB

ionoscloud_logging.KeyApi

All URIs are relative to https://logging.de-fra.ionos.com

Method HTTP request Description
pipelines_key_post POST /pipelines/{pipelineId}/key Create Key

pipelines_key_post

KeyRead pipelines_key_post(pipeline_id)

Create Key

Creates a new Key.

The full Key needs to be provided to create the object. Optional data will be filled with defaults or left empty.

Example

  • Bearer (JWT) Authentication (tokenAuth):
import ionoscloud_logging
from ionoscloud_logging.models.key_read import KeyRead
from ionoscloud_logging.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://logging.de-fra.ionos.com
# See configuration.py for a list of all supported configuration parameters.
configuration = ionoscloud_logging.Configuration(
    host = "https://logging.de-fra.ionos.com"
)

# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.

# Configure Bearer authorization (JWT): tokenAuth
configuration = ionoscloud_logging.Configuration(
    token = os.environ["IONOS_TOKEN"]
)

# Enter a context with an instance of the API client
with ionoscloud_logging.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_logging.KeyApi(api_client)
    pipeline_id = 'f72521ba-1590-5998-bf96-6eb997a5887d' # str | The ID (UUID) of the Pipeline.

    try:
        # Create Key
        api_response = api_instance.pipelines_key_post(pipeline_id)
        print("The response of KeyApi->pipelines_key_post:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling KeyApi->pipelines_key_post: %s\n" % e)

Parameters

Name Type Description Notes
pipeline_id str The ID (UUID) of the Pipeline.

Return type

KeyRead

Authorization

tokenAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
201 Key successfully created. -
400 ### Bad Request The request send to the API was malformed. -
401 ### Unauthorized The request is missing authorization information or the authorization information provided are expired. -
403 ### Not Allowed The user issuing the request does not have the needed permissions. -
415 ### Unsupported Media Type The request has an unsupported media type. -
422 ### Unprocessable Entity The request was well-formed but was unable to be followed due to semantic errors. -
429 ### Too Many Requests The user has sent too many requests in a given amount of time. -
500 ### Internal Server Error An internal error occurred. We apologize for the inconvenience! -
503 ### Service Unavailable The server is currently unable to handle the request due to a temporary overloading or maintenance of the server. -
0 ### Unexpected Internal Server Error An unexpected internal error occurred. We apologize for the inconvenience! -

[Back to top] [Back to API list] [Back to Model list] [Back to README]