# README

Go API client for applicationprincipalmanagement

Handles all administrative requests to manage application identities, including both Agents and Service principals.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 1.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://appdynamics.com

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import applicationprincipalmanagement "github.com/cisco-open/appd-cloud-go-client"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value sw.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), applicationprincipalmanagement.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value sw.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), applicationprincipalmanagement.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), applicationprincipalmanagement.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), applicationprincipalmanagement.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://app-principal-mgmt.iam.svc.cluster.local:80/v1beta

ClassMethodHTTP requestDescription
AgentsApiCreateAgentClientPost /clients/agents
AgentsApiDeleteAgentClientDelete /clients/agents/{clientId}
AgentsApiGetAgentClientGet /clients/agents/{clientId}
AgentsApiListAllAgentClientsGet /clients/agents
AgentsApiRevokeAgentClientSecretsPost /clients/agents/{clientId}/secret/revokeRotated
AgentsApiRotateAgentClientSecretPost /clients/agents/{clientId}/secret/rotate
AgentsApiUpdateAgentClientPut /clients/agents/{clientId}
ServicesApiCreateServiceClientPost /clients/services
ServicesApiDeleteServiceClientDelete /clients/services/{clientId}
ServicesApiGetServiceClientByIdGet /clients/services/{clientId}
ServicesApiListAllServiceClientsGet /clients/services
ServicesApiRevokeServiceClientSecretPost /clients/services/{clientId}/secret/revokeRotated
ServicesApiRotateServiceClientSecretPost /clients/services/{clientId}/secret/rotate
ServicesApiUpdateServiceClientPut /clients/services/{clientId}

Documentation For Models

Documentation For Authorization

BearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), sw.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

[email protected]

# Functions

CacheExpires helper function to determine remaining time before repeating a request.
NewAgentClientRequest instantiates a new AgentClientRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewAgentClientRequestWithDefaults instantiates a new AgentClientRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewAgentClientResponse instantiates a new AgentClientResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewAgentClientResponseCreate instantiates a new AgentClientResponseCreate object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewAgentClientResponseCreateWithDefaults instantiates a new AgentClientResponseCreate object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewAgentClientResponseWithDefaults instantiates a new AgentClientResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewAgentClientsContainer instantiates a new AgentClientsContainer object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewAgentClientsContainerWithDefaults instantiates a new AgentClientsContainer object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewAPIClient creates a new API client.
NewAPIResponse returns a new APIResponse object.
NewAPIResponseWithError returns a new APIResponse object with the provided error message.
NewBadRequestError instantiates a new BadRequestError object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBadRequestErrorWithDefaults instantiates a new BadRequestError object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBaseClientRequest instantiates a new BaseClientRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBaseClientRequestWithDefaults instantiates a new BaseClientRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBaseClientResponse instantiates a new BaseClientResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBaseClientResponseAllOf instantiates a new BaseClientResponseAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBaseClientResponseAllOfWithDefaults instantiates a new BaseClientResponseAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBaseClientResponseCreate instantiates a new BaseClientResponseCreate object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBaseClientResponseCreateAllOf instantiates a new BaseClientResponseCreateAllOf object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewBaseClientResponseCreateAllOfWithDefaults instantiates a new BaseClientResponseCreateAllOf object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBaseClientResponseCreateWithDefaults instantiates a new BaseClientResponseCreate object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewBaseClientResponseWithDefaults instantiates a new BaseClientResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewCredentialsDto instantiates a new CredentialsDto object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewCredentialsDtoWithDefaults instantiates a new CredentialsDto object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewInternalServerError instantiates a new InternalServerError object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewInternalServerErrorWithDefaults instantiates a new InternalServerError object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewInvalidFilterError instantiates a new InvalidFilterError object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewInvalidFilterErrorWithDefaults instantiates a new InvalidFilterError object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
NewResourceNotFound instantiates a new ResourceNotFound object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewResourceNotFoundWithDefaults instantiates a new ResourceNotFound object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRevokeSecretResponse instantiates a new RevokeSecretResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRevokeSecretResponseWithDefaults instantiates a new RevokeSecretResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewRotationRequest instantiates a new RotationRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewRotationRequestWithDefaults instantiates a new RotationRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewServiceClientRequest instantiates a new ServiceClientRequest object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewServiceClientRequestWithDefaults instantiates a new ServiceClientRequest object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewServiceClientResponse instantiates a new ServiceClientResponse object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewServiceClientResponseCreate instantiates a new ServiceClientResponseCreate object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewServiceClientResponseCreateWithDefaults instantiates a new ServiceClientResponseCreate object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewServiceClientResponseWithDefaults instantiates a new ServiceClientResponse object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
NewServiceClientsContainer instantiates a new ServiceClientsContainer object This constructor will assign default values to properties that have it defined, and makes sure properties required by API are set, but the set of arguments will change when the set of required properties is changed.
NewServiceClientsContainerWithDefaults instantiates a new ServiceClientsContainer object This constructor will only assign default values to properties that have it defined, but it doesn't guarantee that properties required by API are set.
PtrBool is a helper routine that returns a pointer to given boolean value.
PtrFloat32 is a helper routine that returns a pointer to given float value.
PtrFloat64 is a helper routine that returns a pointer to given float value.
PtrInt is a helper routine that returns a pointer to given integer value.
PtrInt32 is a helper routine that returns a pointer to given integer value.
PtrInt64 is a helper routine that returns a pointer to given integer value.
PtrString is a helper routine that returns a pointer to given string value.
PtrTime is helper routine that returns a pointer to given Time value.

# Structs

AgentClientRequest Request object for requests to manage Agent client identities.
AgentClientResponse Response object for requests to manage Agent client identities.
AgentClientResponseCreate Response object for requests to manage Agent client identities.
AgentClientsContainer Generic response object which contains an array of AgentClientResponse.
APIClient manages communication with the Application Principal Management Service API v1.0 In most cases there should be only one, shared, APIClient.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
APIResponse stores the API response returned by the server.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
BadRequestError The user request was incomplete or invalid.
BaseClientRequest struct for BaseClientRequest.
BaseClientResponse struct for BaseClientResponse.
BaseClientResponseAllOf struct for BaseClientResponseAllOf.
BaseClientResponseCreate struct for BaseClientResponseCreate.
BaseClientResponseCreateAllOf struct for BaseClientResponseCreateAllOf.
CredentialsDto Data object for a client's credentials.
GenericOpenAPIError Provides access to the body, error and model on returned errors.
InternalServerError An error occured in the service that could not be recovered from.
InvalidFilterError The provided filter specified an incorrect filter attribute, attribute value, or operator.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
ResourceNotFound The requested client was not found.
RevokeSecretResponse struct for RevokeSecretResponse.
RotationRequest struct for RotationRequest.
ServiceClientRequest Request object for requests to manage service clients.
ServiceClientResponse Response object for requests to manage service clients.
ServiceClientResponseCreate Resopnse object for requests to manage service clients.
ServiceClientsContainer Generic response object which contains an array of ServiceClientResponse.

# Type aliases

AgentsApiService AgentsApi service.
ServicesApiService ServicesApi service.