Skip to content

Latest commit

 

History

History
511 lines (352 loc) · 17.5 KB

File metadata and controls

511 lines (352 loc) · 17.5 KB

launchdarkly_api.RelayProxyConfigurationsApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
delete_relay_auto_config DELETE /api/v2/account/relay-auto-configs/{id} Delete Relay Proxy config by ID
get_relay_proxy_config GET /api/v2/account/relay-auto-configs/{id} Get Relay Proxy config
get_relay_proxy_configs GET /api/v2/account/relay-auto-configs List Relay Proxy configs
patch_relay_auto_config PATCH /api/v2/account/relay-auto-configs/{id} Update a Relay Proxy config
post_relay_auto_config POST /api/v2/account/relay-auto-configs Create a new Relay Proxy config
reset_relay_auto_config POST /api/v2/account/relay-auto-configs/{id}/reset Reset Relay Proxy configuration key

delete_relay_auto_config

delete_relay_auto_config(id)

Delete Relay Proxy config by ID

Delete a Relay Proxy config.

Example

  • Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
    host = "https://app.launchdarkly.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 API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = launchdarkly_api.RelayProxyConfigurationsApi(api_client)
    id = 'id_example' # str | The relay auto config id

    try:
        # Delete Relay Proxy config by ID
        api_instance.delete_relay_auto_config(id)
    except Exception as e:
        print("Exception when calling RelayProxyConfigurationsApi->delete_relay_auto_config: %s\n" % e)

Parameters

Name Type Description Notes
id str The relay auto config id

Return type

void (empty response body)

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
204 Action succeeded -
401 Invalid access token -
404 Invalid resource identifier -
409 Status conflict -
429 Rate limited -

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

get_relay_proxy_config

RelayAutoConfigRep get_relay_proxy_config(id)

Get Relay Proxy config

Get a single Relay Proxy auto config by ID.

Example

  • Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.relay_auto_config_rep import RelayAutoConfigRep
from launchdarkly_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
    host = "https://app.launchdarkly.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 API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = launchdarkly_api.RelayProxyConfigurationsApi(api_client)
    id = 'id_example' # str | The relay auto config id

    try:
        # Get Relay Proxy config
        api_response = api_instance.get_relay_proxy_config(id)
        print("The response of RelayProxyConfigurationsApi->get_relay_proxy_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling RelayProxyConfigurationsApi->get_relay_proxy_config: %s\n" % e)

Parameters

Name Type Description Notes
id str The relay auto config id

Return type

RelayAutoConfigRep

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Relay auto config response -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -
429 Rate limited -

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

get_relay_proxy_configs

RelayAutoConfigCollectionRep get_relay_proxy_configs()

List Relay Proxy configs

Get a list of Relay Proxy configurations in the account.

Example

  • Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.relay_auto_config_collection_rep import RelayAutoConfigCollectionRep
from launchdarkly_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
    host = "https://app.launchdarkly.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 API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = launchdarkly_api.RelayProxyConfigurationsApi(api_client)

    try:
        # List Relay Proxy configs
        api_response = api_instance.get_relay_proxy_configs()
        print("The response of RelayProxyConfigurationsApi->get_relay_proxy_configs:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling RelayProxyConfigurationsApi->get_relay_proxy_configs: %s\n" % e)

Parameters

This endpoint does not need any parameter.

Return type

RelayAutoConfigCollectionRep

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Relay auto configs collection response -
401 Invalid access token -
403 Forbidden -
429 Rate limited -

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

patch_relay_auto_config

RelayAutoConfigRep patch_relay_auto_config(id, patch_with_comment)

Update a Relay Proxy config

Update a Relay Proxy configuration. Updating a configuration uses a JSON patch or JSON merge patch representation of the desired changes. To learn more, read Updates.

Example

  • Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.patch_with_comment import PatchWithComment
from launchdarkly_api.models.relay_auto_config_rep import RelayAutoConfigRep
from launchdarkly_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
    host = "https://app.launchdarkly.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 API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = launchdarkly_api.RelayProxyConfigurationsApi(api_client)
    id = 'id_example' # str | The relay auto config id
    patch_with_comment = {"patch":[{"op":"replace","path":"/policy/0","value":{"actions":["*"],"effect":"allow","resources":["proj/*:env/qa"]}}]} # PatchWithComment | 

    try:
        # Update a Relay Proxy config
        api_response = api_instance.patch_relay_auto_config(id, patch_with_comment)
        print("The response of RelayProxyConfigurationsApi->patch_relay_auto_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling RelayProxyConfigurationsApi->patch_relay_auto_config: %s\n" % e)

Parameters

Name Type Description Notes
id str The relay auto config id
patch_with_comment PatchWithComment

Return type

RelayAutoConfigRep

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Relay auto config response -
400 Invalid request -
401 Invalid access token -
404 Invalid resource identifier -
409 Status conflict -
422 Invalid patch content -
429 Rate limited -

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

post_relay_auto_config

RelayAutoConfigRep post_relay_auto_config(relay_auto_config_post)

Create a new Relay Proxy config

Create a Relay Proxy config.

Example

  • Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.relay_auto_config_post import RelayAutoConfigPost
from launchdarkly_api.models.relay_auto_config_rep import RelayAutoConfigRep
from launchdarkly_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
    host = "https://app.launchdarkly.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 API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = launchdarkly_api.RelayProxyConfigurationsApi(api_client)
    relay_auto_config_post = {"name":"Sample Relay Proxy config for all proj and env","policy":[{"actions":["*"],"effect":"allow","resources":["proj/*:env/*"]}]} # RelayAutoConfigPost | 

    try:
        # Create a new Relay Proxy config
        api_response = api_instance.post_relay_auto_config(relay_auto_config_post)
        print("The response of RelayProxyConfigurationsApi->post_relay_auto_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling RelayProxyConfigurationsApi->post_relay_auto_config: %s\n" % e)

Parameters

Name Type Description Notes
relay_auto_config_post RelayAutoConfigPost

Return type

RelayAutoConfigRep

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
201 Relay auto config response -
400 Invalid request -
401 Invalid access token -
429 Rate limited -

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

reset_relay_auto_config

RelayAutoConfigRep reset_relay_auto_config(id, expiry=expiry)

Reset Relay Proxy configuration key

Reset a Relay Proxy configuration's secret key with an optional expiry time for the old key.

Example

  • Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.relay_auto_config_rep import RelayAutoConfigRep
from launchdarkly_api.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
    host = "https://app.launchdarkly.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 API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]

# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'

# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = launchdarkly_api.RelayProxyConfigurationsApi(api_client)
    id = 'id_example' # str | The Relay Proxy configuration ID
    expiry = 56 # int | An expiration time for the old Relay Proxy configuration key, expressed as a Unix epoch time in milliseconds. By default, the Relay Proxy configuration will expire immediately. (optional)

    try:
        # Reset Relay Proxy configuration key
        api_response = api_instance.reset_relay_auto_config(id, expiry=expiry)
        print("The response of RelayProxyConfigurationsApi->reset_relay_auto_config:\n")
        pprint(api_response)
    except Exception as e:
        print("Exception when calling RelayProxyConfigurationsApi->reset_relay_auto_config: %s\n" % e)

Parameters

Name Type Description Notes
id str The Relay Proxy configuration ID
expiry int An expiration time for the old Relay Proxy configuration key, expressed as a Unix epoch time in milliseconds. By default, the Relay Proxy configuration will expire immediately. [optional]

Return type

RelayAutoConfigRep

Authorization

ApiKey

HTTP request headers

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

HTTP response details

Status code Description Response headers
200 Relay auto config response -
401 Invalid access token -
403 Forbidden -
404 Invalid resource identifier -
429 Rate limited -

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