Skip to content

Latest commit

 

History

History
355 lines (224 loc) · 10.4 KB

IPAllowlistBetaApi.md

File metadata and controls

355 lines (224 loc) · 10.4 KB

\IPAllowlistBetaApi

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

Method HTTP request Description
CreateIpAllowlistEntry Post /api/v2/account/ip-allowlist Create IP Allowlist Entry
DeleteIpAllowlistEntry Delete /api/v2/account/ip-allowlist/{id} Delete IP Allowlist Entry
GetIpAllowlist Get /api/v2/account/ip-allowlist Get IP Allowlist
PatchIpAllowlistConfig Patch /api/v2/account/ip-allowlist Update IP Allowlist Configuration
PatchIpAllowlistEntry Patch /api/v2/account/ip-allowlist/{id} Update IP Allowlist Entry Description

CreateIpAllowlistEntry

IpAllowlistEntryResponse CreateIpAllowlistEntry(ctx).CreateIpAllowlistEntryRequest(createIpAllowlistEntryRequest).Execute()

Create IP Allowlist Entry

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/launchdarkly/api-client-go"
)

func main() {
	createIpAllowlistEntryRequest := *openapiclient.NewCreateIpAllowlistEntryRequest("203.0.113.0/24") // CreateIpAllowlistEntryRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.IPAllowlistBetaApi.CreateIpAllowlistEntry(context.Background()).CreateIpAllowlistEntryRequest(createIpAllowlistEntryRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `IPAllowlistBetaApi.CreateIpAllowlistEntry``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `CreateIpAllowlistEntry`: IpAllowlistEntryResponse
	fmt.Fprintf(os.Stdout, "Response from `IPAllowlistBetaApi.CreateIpAllowlistEntry`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiCreateIpAllowlistEntryRequest struct via the builder pattern

Name Type Description Notes
createIpAllowlistEntryRequest CreateIpAllowlistEntryRequest

Return type

IpAllowlistEntryResponse

Authorization

ApiKey

HTTP request headers

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

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

DeleteIpAllowlistEntry

DeleteIpAllowlistEntry(ctx, id).Execute()

Delete IP Allowlist Entry

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/launchdarkly/api-client-go"
)

func main() {
	id := "id_example" // string | Unique identifier for the allowlist entry

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	r, err := apiClient.IPAllowlistBetaApi.DeleteIpAllowlistEntry(context.Background(), id).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `IPAllowlistBetaApi.DeleteIpAllowlistEntry``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Unique identifier for the allowlist entry

Other Parameters

Other parameters are passed through a pointer to a apiDeleteIpAllowlistEntryRequest struct via the builder pattern

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

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

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

GetIpAllowlist

IpAllowlistResponse GetIpAllowlist(ctx).Search(search).Limit(limit).Offset(offset).Execute()

Get IP Allowlist

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/launchdarkly/api-client-go"
)

func main() {
	search := "search_example" // string | A case-insensitive substring to filter entries by. Matches against the IP address or CIDR block and the description. (optional)
	limit := int32(56) // int32 | The number of entries to return. When omitted, all matching entries are returned. Maximum is 100. (optional)
	offset := int32(56) // int32 | The number of entries to skip. Used for pagination. (optional)

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.IPAllowlistBetaApi.GetIpAllowlist(context.Background()).Search(search).Limit(limit).Offset(offset).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `IPAllowlistBetaApi.GetIpAllowlist``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `GetIpAllowlist`: IpAllowlistResponse
	fmt.Fprintf(os.Stdout, "Response from `IPAllowlistBetaApi.GetIpAllowlist`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetIpAllowlistRequest struct via the builder pattern

Name Type Description Notes
search string A case-insensitive substring to filter entries by. Matches against the IP address or CIDR block and the description.
limit int32 The number of entries to return. When omitted, all matching entries are returned. Maximum is 100.
offset int32 The number of entries to skip. Used for pagination.

Return type

IpAllowlistResponse

Authorization

ApiKey

HTTP request headers

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

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

PatchIpAllowlistConfig

IpAllowlistResponse PatchIpAllowlistConfig(ctx).PatchIpAllowlistConfigRequest(patchIpAllowlistConfigRequest).Execute()

Update IP Allowlist Configuration

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/launchdarkly/api-client-go"
)

func main() {
	patchIpAllowlistConfigRequest := *openapiclient.NewPatchIpAllowlistConfigRequest() // PatchIpAllowlistConfigRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.IPAllowlistBetaApi.PatchIpAllowlistConfig(context.Background()).PatchIpAllowlistConfigRequest(patchIpAllowlistConfigRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `IPAllowlistBetaApi.PatchIpAllowlistConfig``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PatchIpAllowlistConfig`: IpAllowlistResponse
	fmt.Fprintf(os.Stdout, "Response from `IPAllowlistBetaApi.PatchIpAllowlistConfig`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPatchIpAllowlistConfigRequest struct via the builder pattern

Name Type Description Notes
patchIpAllowlistConfigRequest PatchIpAllowlistConfigRequest

Return type

IpAllowlistResponse

Authorization

ApiKey

HTTP request headers

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

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

PatchIpAllowlistEntry

IpAllowlistEntryResponse PatchIpAllowlistEntry(ctx, id).PatchIpAllowlistEntryRequest(patchIpAllowlistEntryRequest).Execute()

Update IP Allowlist Entry Description

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/launchdarkly/api-client-go"
)

func main() {
	id := "id_example" // string | Unique identifier for the allowlist entry
	patchIpAllowlistEntryRequest := *openapiclient.NewPatchIpAllowlistEntryRequest("Updated description") // PatchIpAllowlistEntryRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.IPAllowlistBetaApi.PatchIpAllowlistEntry(context.Background(), id).PatchIpAllowlistEntryRequest(patchIpAllowlistEntryRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `IPAllowlistBetaApi.PatchIpAllowlistEntry``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PatchIpAllowlistEntry`: IpAllowlistEntryResponse
	fmt.Fprintf(os.Stdout, "Response from `IPAllowlistBetaApi.PatchIpAllowlistEntry`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string Unique identifier for the allowlist entry

Other Parameters

Other parameters are passed through a pointer to a apiPatchIpAllowlistEntryRequest struct via the builder pattern

Name Type Description Notes

patchIpAllowlistEntryRequest | PatchIpAllowlistEntryRequest | |

Return type

IpAllowlistEntryResponse

Authorization

ApiKey

HTTP request headers

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

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