Add api client for playwright e2e tests (#2901)
* chore: 🤖 add @openapitools/openapi-generator-cli * chore: 🤖 Add @nestjs/core and @openapitools/openapi-generator-cli to ignoredBuiltDependencies These packages use postinstall for a opencollective notice * chore: 🤖 add package.json scripts for open-api client gen * chore: 🤖 add openapi generated files * chore: 🤖 add boundary api client fixture * chore: 🤖 incorporate api client fixture with base fixture * chore: 🤖 migrate existing test to use boundary api fixture * refactor: 💡 remove org cleanup from test * refactor: 💡 update sorting e2e test to use api client * refactor: 💡 clean up api client resource clean up logging * docs: ✏️ update jsdoc links for domain clients * chore: 🤖 avoid adding copywright headers to generated api * Add missing copyright headers * chore: 🤖 remove fetch argument from api client class The hope was to use request.fetch but playwright's fetch is a non-standard fetch which causes the generated api client to fail when using .clone() on the response * chore: 🤖 add optional OPENAPI_SWAGGER_URL_OR_FILE for openapi-client generation The OPENAPI_SWAGGER_URL_OR_FILE env var can be used to specify the -i flag the generate:api-client script with either: * a relative path * an absolute path * a url like: https://raw.githubusercontent.com/hashicorp/boundary/refs/heads/main/internal/gen/controller.swagger.json * refactor: 💡 clean up and refactor boundary-api-client fixture * chore: 🤖 add extra doc links and delete methods * test: 💍 add test to ensure that api-client fixture works * test: 💍 update existing e2e test examples with api-client * docs: ✏️ add comment for api-client e2e test * docs: ✏️ add additional links to service docs for api clients * refactor: 💡 cleanup api-client and corresponding test * docs: ✏️ add api client fixture docs to e2e README * fix: 🐛 fix regex * remove unnecessary capture group * add "-" to regex to allow for url segments like "storage-buckets" in "/v1/storage-buckets" * docs: ✏️ comment potential edge case in e2e api client cleanup * docs: ✏️ fix comment typo Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> * docs: ✏️ remove auth flag for generating e2e client * docs: ✏️ add mention that java is required for generate:api * chore: 🤖 implement pr feedback * chore: 🤖 Clean up api client and add more extensive test * chore: 🤖 fix casing in api-client test Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com> --------- Co-authored-by: Zhihe Li <zhihe.li@hashicorp.com>
This commit is contained in:
1 parent
5fd9f0216a
commit
b42ecbff36
262 files changed
+31646
-192
No files matched your search
+3
-2
@@ -13,9 +13,10 @@ project {
|
||||
"**/node_modules/**",
|
||||
"**/dist/**",
|
||||
"**/coverage/**",
|
||||
"ui/desktop/electron-app/out/**",
|
||||
"ui/desktop/electron-app/ember-dist/**",
|
||||
"**/pnpm-lock.yaml",
|
||||
"**/pnpm-workspace.yaml",
|
||||
"ui/desktop/electron-app/out/**",
|
||||
"ui/desktop/electron-app/ember-dist/**",
|
||||
"e2e-tests/api-client/**"
|
||||
]
|
||||
}
|
||||
@@ -22,6 +22,11 @@
|
||||
- [Developing Tests](#developing-tests)
|
||||
- [Test names and tagging](#test-names-and-tagging)
|
||||
- [Selecting / Locating Elements](#selecting--locating-elements)
|
||||
- [Api Client Fixture](#api-client-fixture)
|
||||
- [Using the fixture](#using-the-fixture)
|
||||
- [Features](#features)
|
||||
- [Generating the api client](#generating-the-api-client)
|
||||
- [Testing with resources (api, page objects, cli)](#testing-with-resources-api-page-objects-cli)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
@@ -259,3 +264,80 @@ accessibility features perceive the page. `getByLabel` should be used for form f
|
||||
|
||||
Additional information can be found [here](https://playwright.dev/docs/locators#locating-elements)
|
||||
and [here](https://testing-library.com/docs/queries/about/#priority).
|
||||
|
||||
### Api Client Fixture
|
||||
The `apiClient` fixture is available in tests to make calls against the boundary api. This fixture wraps an api client that is auto-generated from the [boundary api openapi swagger spec](https://raw.githubusercontent.com/hashicorp/boundary/main/internal/gen/controller.swagger.json).
|
||||
|
||||
#### Using the fixture
|
||||
The api client fixture can be used in tests anywhere fixtures are available:
|
||||
```js
|
||||
// within a test
|
||||
test(
|
||||
'An example test',
|
||||
{ tag: ['@ce', '@ent', '@aws', '@docker'] },
|
||||
async ({ apiClient }) => {
|
||||
org = await apiClient.clients.Scope.scopeServiceCreateScope({
|
||||
item: {
|
||||
name: 'Org A',
|
||||
scopeId: 'global',
|
||||
},
|
||||
});
|
||||
}
|
||||
);
|
||||
|
||||
// in `beforeEach` (also works the same for `afterEach`)
|
||||
test.beforeEach(async ({ apiClient }) => {
|
||||
org = await apiClient.clients.Scope.scopeServiceCreateScope({
|
||||
item: {
|
||||
name: 'Org A',
|
||||
scopeId: 'global',
|
||||
},
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
#### Features
|
||||
|
||||
* The api client should have all publicly documented APIs
|
||||
* Generated api client uses typescript to help with the discovery of the required arguments
|
||||
* Any untyped `attributes` that have been documented by a `description` in the swagger doc will also be included as a docblock comment when inspecting `attributes` in the editor (see `ControllerApiResourcesAccountsV1Account.attributes` in `models/ControllerApiResourcesAccountsV1Account.ts` for an example)
|
||||
* Automatic resource clean up
|
||||
* Any resources created by the api client will be automatically cleaned up after the test is finished. To skip cleanup of a resource pass in the created resource to `apiClient.skipCleanup(createdResource);` (where `createdResource` has an `id` property).
|
||||
* In some cases resources will need child resources, created outside the api, to be cleaned up first. For example, a storage bucket created by the api client cannot be automatically cleaned up until all session recordings have been deleted. Session recordings are created automatically and not tracked by the API so these need to be deleted manually. Session recordings cannot be deleted unless they are in a `available` state which depends on the session being recorded being in a `terminated` state. Sessions also are not created by the api and need to be cleaned up manually.
|
||||
* Error logging
|
||||
* When api calls fail with an http status code >= 400 the error response is logged
|
||||
|
||||
#### Generating the api client
|
||||
|
||||
The generated client is found in the `api-client` folder. Manual changes should not be made to any of the files in this folder because they will be overriden the next time the client is generated.
|
||||
|
||||
To regenerate the api-client run the `generate:api` package.json scripts command. By default this will use the latest swagger doc from the public [`boundary` repo](https://github.com/hashicorp/boundary) on the `main` branch at `main/internal/gen/controller.swagger.json`. Note: The `generate:api` script calls `openapi-generator-cli` which requires java to be available on your PATH environment variable.
|
||||
|
||||
```shell
|
||||
pnpm generate:api-client
|
||||
```
|
||||
|
||||
If working on an E2E test that is working against a different version of the boundary api, ensure the updated openapi swagger doc has been generated and set `OPENAPI_SWAGGER_URL_OR_FILE` to the path or url:
|
||||
```shell
|
||||
# using a custom url (must be publicly accessible)
|
||||
# in the following example $COMMITISH can be replaced with a branch name, commit, or tag
|
||||
OPENAPI_SWAGGER_URL_OR_FILE=https://raw.githubusercontent.com/hashicorp/boundary/$COMMITISH/internal/gen/controller.swagger.json pnpm generate:api-client
|
||||
|
||||
# using a local absolute or relative path
|
||||
OPENAPI_SWAGGER_URL_OR_FILE=../../boundary-enterprise/internal/gen/controller.swagger.json pnpm generate:api-client
|
||||
```
|
||||
|
||||
Consider committing any changes to the generated `api-client` directory if the changes are needed for the current e2e tests to pass.
|
||||
|
||||
### Testing with resources (api, page objects, cli)
|
||||
|
||||
When testing an E2E workflow, resources often use page objects (within `admin/pages` and `desktop/pages`) or use methods on playwright locators directly. These simulate user actions to ensure that we are testing our applications the way our users use them.
|
||||
|
||||
In cases where resources need to be scaffolded as a prerequisite to a test, but are not needed to be tested directly, the `apiClient` fixture should be used. This type of common setup can usually be done in `test.beforeEach` to separate it from the `test` itself. Using the `apiClient` has the added benefit of:
|
||||
* being quicker to set up (api calls are faster)
|
||||
* return api responses and resource definitions
|
||||
* any created resource is automatically cleaned up after the test
|
||||
|
||||
Aside from creating resources, the `apiClient` fixture can be used in any case where interaction with the boundary api is needed.
|
||||
|
||||
As a last resort when page objects and the `apiClient` fixture can't be used then the boundary cli helper can be used.
|
||||
@@ -0,0 +1,366 @@
|
||||
/**
|
||||
* Copyright (c) HashiCorp, Inc.
|
||||
* SPDX-License-Identifier: BUSL-1.1
|
||||
*/
|
||||
|
||||
import { test as base } from '../../global-setup.js';
|
||||
import { expect } from '@playwright/test';
|
||||
import { customAlphabet } from 'nanoid';
|
||||
|
||||
import * as boundaryCli from '../../helpers/boundary-cli';
|
||||
import { readFile } from 'fs/promises';
|
||||
|
||||
// These tests are to make sure that the api-client fixture works as expected.
|
||||
// Test helpers or fixtures don't always have tests, but because this one has
|
||||
// enough complexity it's worth testing
|
||||
|
||||
const nanoid = customAlphabet('1234567890abcdefghijklmnopqrstuvwxyz', 5);
|
||||
const scopeId = 'global';
|
||||
const aliasCleanedUpDescription = `this alias should be cleaned up ${nanoid()}`;
|
||||
const aliasSkippedDescription = `this alias should not be cleaned up ${nanoid()}`;
|
||||
|
||||
const test = base.extend(
|
||||
{
|
||||
apiClientTestAfter: async ({}, use) => {
|
||||
let apiClientTestAfter;
|
||||
const setApiClientTestAfter = (fn) => {
|
||||
apiClientTestAfter = fn;
|
||||
};
|
||||
await use(setApiClientTestAfter);
|
||||
await apiClientTestAfter?.();
|
||||
},
|
||||
},
|
||||
{ scope: 'test', auto: true },
|
||||
);
|
||||
|
||||
test(
|
||||
'resources can be created (example: alias)',
|
||||
{ tag: ['@ce', '@ent', '@aws', '@docker'] },
|
||||
async ({ apiClient, apiClientTestAfter }) => {
|
||||
await apiClient.clients.Alias.aliasServiceCreateAlias({
|
||||
item: {
|
||||
scopeId,
|
||||
description: aliasCleanedUpDescription,
|
||||
value: `a-${nanoid(4)}.dev`,
|
||||
type: 'target',
|
||||
},
|
||||
});
|
||||
|
||||
const skipAlias = await apiClient.clients.Alias.aliasServiceCreateAlias({
|
||||
item: {
|
||||
scopeId,
|
||||
description: aliasSkippedDescription,
|
||||
value: `b-${nanoid(4)}.dev`,
|
||||
type: 'target',
|
||||
},
|
||||
});
|
||||
|
||||
apiClient.skipCleanup(skipAlias);
|
||||
|
||||
// These assertions ensure that by the end of this test the two aliases
|
||||
// exist. In the next test they are checked to see if clean up and
|
||||
// skipping clean up worked correctly
|
||||
const aliases = await apiClient.clients.Alias.aliasServiceListAliases({
|
||||
scopeId,
|
||||
});
|
||||
const cleanedUpAlias = aliases.items.find(
|
||||
({ description }) => description === aliasCleanedUpDescription,
|
||||
);
|
||||
expect(cleanedUpAlias).toBeTruthy();
|
||||
const cleanUpSkippedAlias = aliases.items.find(
|
||||
({ description }) => description === aliasSkippedDescription,
|
||||
);
|
||||
expect(cleanUpSkippedAlias).toBeTruthy();
|
||||
|
||||
apiClientTestAfter(async () => {
|
||||
const aliases = await apiClient.clients.Alias.aliasServiceListAliases({
|
||||
scopeId,
|
||||
});
|
||||
const cleanedUpAlias = aliases.items.find(
|
||||
({ description }) => description === aliasCleanedUpDescription,
|
||||
);
|
||||
// the `cleanedUpAlias` has been cleaned up so it isn't expected to be found
|
||||
expect(cleanedUpAlias).toBeFalsy();
|
||||
const cleanUpSkippedAlias = aliases.items.find(
|
||||
({ description }) => description === aliasSkippedDescription,
|
||||
);
|
||||
// the `cleanUpSkippedAlias` skipped cleanup so it should still exist
|
||||
expect(cleanUpSkippedAlias).toBeTruthy();
|
||||
|
||||
// manually clean up skipped resource
|
||||
await apiClient.clients.Alias.aliasServiceDeleteAlias({
|
||||
id: cleanUpSkippedAlias.id,
|
||||
});
|
||||
});
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'it logs the response when an error is returned from an api call',
|
||||
{ tag: ['@ce', '@ent', '@aws', '@docker'] },
|
||||
async ({ apiClient }) => {
|
||||
const consoleErrors = [];
|
||||
const originalConsoleError = console.error;
|
||||
console.error = (toLog) => {
|
||||
consoleErrors.push(toLog);
|
||||
};
|
||||
|
||||
await apiClient.clients.Alias.aliasServiceListAliases({
|
||||
scopeId: 'not a valid scope id',
|
||||
// this request is expected to fail and throw
|
||||
}).catch(() => {});
|
||||
|
||||
expect(consoleErrors).toHaveLength(1);
|
||||
expect(consoleErrors[0]).toContain(
|
||||
'Error response from Boundary API, status code: 400, with method: GET',
|
||||
);
|
||||
expect(consoleErrors[0]).toContain('Improperly formatted identifier.');
|
||||
|
||||
// restore the original console.error
|
||||
console.error = originalConsoleError;
|
||||
},
|
||||
);
|
||||
|
||||
test(
|
||||
'it throws when #skipCleanup is given an object without an id',
|
||||
{ tag: ['@ce', '@ent', '@aws', '@docker'] },
|
||||
({ apiClient }) => {
|
||||
expect(() =>
|
||||
apiClient.skipCleanup('not an object with an id property'),
|
||||
).toThrow('The `id` field is expected on the resource');
|
||||
},
|
||||
);
|
||||
|
||||
// This test serves as a more complex example and exercises many connected resources.
|
||||
// It also serves to illustrate that there are some resources, like storage buckets,
|
||||
// that may be dependent on other resources created outside the api being cleaned up first,
|
||||
// like sessions being cancelled and session recordings being deleted. Once these are
|
||||
// cleaned up then automatic clean up should work.
|
||||
test(
|
||||
'Storage buckets can be cleaned up after a session is manually cancelled and session recordings are manually deleted',
|
||||
{ tag: ['@ent', '@docker'] },
|
||||
async ({
|
||||
controllerAddr,
|
||||
adminAuthMethodId,
|
||||
adminLoginName,
|
||||
adminPassword,
|
||||
bucketAccessKeyId,
|
||||
bucketEndpointUrl,
|
||||
bucketName,
|
||||
bucketSecretAccessKey,
|
||||
region,
|
||||
sshUser,
|
||||
sshKeyPath,
|
||||
targetAddress,
|
||||
targetPort,
|
||||
workerTagEgress,
|
||||
apiClient,
|
||||
apiClientTestAfter,
|
||||
}) => {
|
||||
await boundaryCli.checkBoundaryCli();
|
||||
|
||||
let connect;
|
||||
try {
|
||||
await boundaryCli.authenticateBoundary(
|
||||
controllerAddr,
|
||||
adminAuthMethodId,
|
||||
adminLoginName,
|
||||
adminPassword,
|
||||
);
|
||||
|
||||
const org = await apiClient.clients.Scope.scopeServiceCreateScope({
|
||||
item: {
|
||||
name: `Org-${nanoid()}`,
|
||||
scopeId: 'global',
|
||||
},
|
||||
});
|
||||
|
||||
const project = await apiClient.clients.Scope.scopeServiceCreateScope({
|
||||
item: {
|
||||
name: `Project-${nanoid()}`,
|
||||
scopeId: org.id,
|
||||
},
|
||||
});
|
||||
|
||||
const storageBucket =
|
||||
await apiClient.clients.StorageBucket.storageBucketServiceCreateStorageBucket(
|
||||
{
|
||||
pluginName: 'minio',
|
||||
item: {
|
||||
scopeId: org.scopeId,
|
||||
bucketName,
|
||||
workerFilter: `"${workerTagEgress}" in "/tags/type"`,
|
||||
attributes: {
|
||||
region,
|
||||
endpoint_url: bucketEndpointUrl,
|
||||
disable_credential_rotation: true,
|
||||
},
|
||||
secrets: {
|
||||
access_key_id: bucketAccessKeyId,
|
||||
secret_access_key: bucketSecretAccessKey,
|
||||
},
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
const target = await apiClient.clients.Target.targetServiceCreateTarget({
|
||||
item: {
|
||||
name: `ssh-target-${nanoid()}`,
|
||||
scopeId: project.id,
|
||||
type: 'ssh',
|
||||
address: targetAddress,
|
||||
ingressWorkerFilter: `"${workerTagEgress}" in "/tags/type"`,
|
||||
egressWorkerFilter: `"${workerTagEgress}" in "/tags/type"`,
|
||||
attributes: {
|
||||
default_port: targetPort,
|
||||
enable_session_recording: true,
|
||||
storage_bucket_id: storageBucket.id,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
const credentialStore =
|
||||
await apiClient.clients.CredentialStore.credentialStoreServiceCreateCredentialStore(
|
||||
{
|
||||
item: {
|
||||
scopeId: project.id,
|
||||
type: 'static',
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
const keyData = await readFile(sshKeyPath, {
|
||||
encoding: 'utf-8',
|
||||
});
|
||||
|
||||
const credential =
|
||||
await apiClient.clients.Credential.credentialServiceCreateCredential({
|
||||
item: {
|
||||
credentialStoreId: credentialStore.id,
|
||||
type: 'ssh_private_key',
|
||||
attributes: {
|
||||
username: sshUser,
|
||||
private_key: keyData,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
await apiClient.clients.Target.targetServiceAddTargetCredentialSources({
|
||||
id: target.id,
|
||||
body: {
|
||||
injectedApplicationCredentialSourceIds: [credential.id],
|
||||
version: 1,
|
||||
},
|
||||
});
|
||||
|
||||
const storagePolicy =
|
||||
await apiClient.clients.Policy.policyServiceCreatePolicy({
|
||||
item: {
|
||||
type: 'storage',
|
||||
scopeId: 'global',
|
||||
attributes: {
|
||||
delete_after: { days: 1 },
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
apiClient.clients.Scope.scopeServiceAttachStoragePolicy({
|
||||
id: org.id,
|
||||
body: {
|
||||
storagePolicyId: storagePolicy.id,
|
||||
version: 1,
|
||||
},
|
||||
});
|
||||
|
||||
connect = await boundaryCli.connectSshToTarget(target.id);
|
||||
|
||||
let waitForSessionCount = 0;
|
||||
let sshSession;
|
||||
while (!sshSession) {
|
||||
const sessions =
|
||||
await apiClient.clients.Session.sessionServiceListSessions({
|
||||
scopeId: target.scopeId,
|
||||
});
|
||||
|
||||
sshSession = sessions?.items.find(
|
||||
(session) =>
|
||||
session.status === 'active' && session.targetId === target.id,
|
||||
);
|
||||
|
||||
if (waitForSessionCount >= 20) {
|
||||
throw new Error(
|
||||
'Max attempts exceeded waiting for target to session to be created',
|
||||
);
|
||||
}
|
||||
|
||||
// avoid being rate limited
|
||||
await new Promise((r) => setTimeout(r, 500));
|
||||
waitForSessionCount++;
|
||||
}
|
||||
|
||||
await apiClient.clients.Session.sessionServiceCancelSession({
|
||||
id: sshSession.id,
|
||||
body: {
|
||||
version: sshSession.version,
|
||||
},
|
||||
});
|
||||
|
||||
let waitForSessionRecordingCount = 0;
|
||||
let completedSessionRecording;
|
||||
while (!completedSessionRecording) {
|
||||
completedSessionRecording = (
|
||||
await apiClient.clients.SessionRecording.sessionRecordingServiceListSessionRecordings(
|
||||
{
|
||||
scopeId: 'global',
|
||||
recursive: true,
|
||||
},
|
||||
)
|
||||
).items.find(
|
||||
(recording) =>
|
||||
recording.sessionId === sshSession.id &&
|
||||
recording.state === 'available',
|
||||
);
|
||||
|
||||
// Session recordings have to be cleaned up manually before a storage bucket can be deleted.
|
||||
// And session recordings can only be cleaned up once they are completed
|
||||
if (completedSessionRecording) {
|
||||
await apiClient.clients.SessionRecording.sessionRecordingServiceDeleteSessionRecording(
|
||||
{
|
||||
id: completedSessionRecording.id,
|
||||
body: { version: completedSessionRecording.version },
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
if (waitForSessionRecordingCount >= 20) {
|
||||
throw new Error(
|
||||
'Max attempts exceeded waiting for target to session recording to be completed',
|
||||
);
|
||||
}
|
||||
|
||||
// avoid being rate limited
|
||||
await new Promise((r) => setTimeout(r, 500));
|
||||
waitForSessionRecordingCount++;
|
||||
}
|
||||
} finally {
|
||||
// End `boundary connect` process
|
||||
connect?.kill('SIGTERM');
|
||||
}
|
||||
|
||||
apiClientTestAfter(async () => {
|
||||
const storageBuckets =
|
||||
(
|
||||
await apiClient.clients.StorageBucket.storageBucketServiceListStorageBuckets(
|
||||
{
|
||||
scopeId: 'global',
|
||||
recursive: true,
|
||||
},
|
||||
)
|
||||
).items ?? [];
|
||||
|
||||
expect(
|
||||
storageBuckets.find((bucket) => bucket.id === storageBuckets.id),
|
||||
).toBeUndefined();
|
||||
});
|
||||
},
|
||||
);
|
||||
@@ -5,159 +5,166 @@
|
||||
|
||||
import { test } from '../../global-setup.js';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
import * as boundaryHttp from '../../helpers/boundary-http.js';
|
||||
import { nanoid } from 'nanoid';
|
||||
|
||||
test(
|
||||
'Search and Pagination (Targets)',
|
||||
{ tag: ['@ce', '@ent', '@aws', '@docker'] },
|
||||
async ({ page, request }) => {
|
||||
let org;
|
||||
try {
|
||||
org = await boundaryHttp.createOrg(request);
|
||||
const project = await boundaryHttp.createProject(request, org.id);
|
||||
async ({ page, apiClient }) => {
|
||||
const org = await apiClient.clients.Scope.scopeServiceCreateScope({
|
||||
item: {
|
||||
name: `Org-${nanoid()}`,
|
||||
scopeId: 'global',
|
||||
},
|
||||
});
|
||||
|
||||
// Create targets
|
||||
let targets = [];
|
||||
const targetCount = 15;
|
||||
for (let i = 0; i < targetCount; i++) {
|
||||
const target = await boundaryHttp.createTarget(request, {
|
||||
const project = await apiClient.clients.Scope.scopeServiceCreateScope({
|
||||
item: {
|
||||
name: `Project-${nanoid()}`,
|
||||
scopeId: org.id,
|
||||
},
|
||||
});
|
||||
|
||||
// Create targets
|
||||
let targets = [];
|
||||
const targetCount = 15;
|
||||
for (let i = 0; i < targetCount; i++) {
|
||||
const target = await apiClient.clients.Target.targetServiceCreateTarget({
|
||||
item: {
|
||||
name: `Target-${nanoid()}`,
|
||||
scopeId: project.id,
|
||||
type: 'tcp',
|
||||
port: 22,
|
||||
});
|
||||
targets.push(target);
|
||||
}
|
||||
attributes: {
|
||||
default_port: 22,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Navigate to targets page
|
||||
await page.goto('/');
|
||||
await page.getByRole('link', { name: org.name }).click();
|
||||
await page.getByRole('link', { name: project.name }).click();
|
||||
await page
|
||||
.getByRole('navigation', { name: 'Application local navigation' })
|
||||
.getByRole('link', { name: 'Targets' })
|
||||
.click();
|
||||
await expect(
|
||||
page.getByRole('heading', { name: 'Targets' }),
|
||||
).toBeVisible();
|
||||
|
||||
// Check pagination
|
||||
// The most recent target should be visible. The oldest target should not be
|
||||
// visible since there are 15 targets and the default page size is 10.
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeHidden();
|
||||
|
||||
// Navigate to the second page. The oldest target should now be visible.
|
||||
await page
|
||||
.getByRole('navigation', { name: 'pagination' })
|
||||
.getByRole('link', { name: 'page 2' })
|
||||
.click();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeHidden();
|
||||
|
||||
// Use the "previous page" button to navigate back to the first page.
|
||||
await page
|
||||
.getByRole('navigation', { name: 'pagination' })
|
||||
.getByRole('link', { name: 'Previous page' })
|
||||
.click();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeHidden();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
|
||||
// Use the "next page" button to navigate back to the second page.
|
||||
await page
|
||||
.getByRole('navigation', { name: 'pagination' })
|
||||
.getByRole('link', { name: 'Next page' })
|
||||
.click();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeHidden();
|
||||
|
||||
// Use the search box to find the most recent target.
|
||||
await page
|
||||
.getByRole('searchbox', { name: 'Search' })
|
||||
.fill(targets[targets.length - 1].name);
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeHidden();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 2].name }),
|
||||
).toBeHidden();
|
||||
|
||||
// Clear the search box
|
||||
await page.getByRole('searchbox', { name: 'Search' }).clear();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeHidden();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 2].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
|
||||
// Use the "Items per page" options to show 30 items per page.
|
||||
await page
|
||||
.getByRole('combobox', { name: 'Items per page' })
|
||||
.selectOption('30');
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 2].name }),
|
||||
).toBeVisible();
|
||||
|
||||
// Use the "Items per page" options to show 50 items per page.
|
||||
await page
|
||||
.getByRole('combobox', { name: 'Items per page' })
|
||||
.selectOption('50');
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 2].name }),
|
||||
).toBeVisible();
|
||||
|
||||
// Use the "Items per page" options to show 10 items per page.
|
||||
await page
|
||||
.getByRole('combobox', { name: 'Items per page' })
|
||||
.selectOption('10');
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeHidden();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 2].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
} finally {
|
||||
if (org.id) {
|
||||
org = await request.delete(`/v1/scopes/${org.id}`);
|
||||
}
|
||||
targets.push(target);
|
||||
}
|
||||
|
||||
// Navigate to targets page
|
||||
await page.goto('/');
|
||||
await page.getByRole('link', { name: org.name }).click();
|
||||
await page.getByRole('link', { name: project.name }).click();
|
||||
await page
|
||||
.getByRole('navigation', { name: 'Application local navigation' })
|
||||
.getByRole('link', { name: 'Targets' })
|
||||
.click();
|
||||
await expect(page.getByRole('heading', { name: 'Targets' })).toBeVisible();
|
||||
|
||||
// Check pagination
|
||||
// The most recent target should be visible. The oldest target should not be
|
||||
// visible since there are 15 targets and the default page size is 10.
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeHidden();
|
||||
|
||||
// Navigate to the second page. The oldest target should now be visible.
|
||||
await page
|
||||
.getByRole('navigation', { name: 'pagination' })
|
||||
.getByRole('link', { name: 'page 2' })
|
||||
.click();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeHidden();
|
||||
|
||||
// Use the "previous page" button to navigate back to the first page.
|
||||
await page
|
||||
.getByRole('navigation', { name: 'pagination' })
|
||||
.getByRole('link', { name: 'Previous page' })
|
||||
.click();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeHidden();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
|
||||
// Use the "next page" button to navigate back to the second page.
|
||||
await page
|
||||
.getByRole('navigation', { name: 'pagination' })
|
||||
.getByRole('link', { name: 'Next page' })
|
||||
.click();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeHidden();
|
||||
|
||||
// Use the search box to find the most recent target.
|
||||
await page
|
||||
.getByRole('searchbox', { name: 'Search' })
|
||||
.fill(targets[targets.length - 1].name);
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeHidden();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 2].name }),
|
||||
).toBeHidden();
|
||||
|
||||
// Clear the search box
|
||||
await page.getByRole('searchbox', { name: 'Search' }).clear();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeHidden();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 2].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
|
||||
// Use the "Items per page" options to show 30 items per page.
|
||||
await page
|
||||
.getByRole('combobox', { name: 'Items per page' })
|
||||
.selectOption('30');
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 2].name }),
|
||||
).toBeVisible();
|
||||
|
||||
// Use the "Items per page" options to show 50 items per page.
|
||||
await page
|
||||
.getByRole('combobox', { name: 'Items per page' })
|
||||
.selectOption('50');
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 2].name }),
|
||||
).toBeVisible();
|
||||
|
||||
// Use the "Items per page" options to show 10 items per page.
|
||||
await page
|
||||
.getByRole('combobox', { name: 'Items per page' })
|
||||
.selectOption('10');
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[0].name }),
|
||||
).toBeHidden();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 2].name }),
|
||||
).toBeVisible();
|
||||
await expect(
|
||||
page.getByRole('link', { name: targets[targets.length - 1].name }),
|
||||
).toBeVisible();
|
||||
},
|
||||
);
|
||||
@@ -4,8 +4,6 @@
|
||||
*/
|
||||
|
||||
import { test } from '../../global-setup.js';
|
||||
import * as boundaryHttp from '../../helpers/boundary-http.js';
|
||||
import * as boundaryCli from '../../helpers/boundary-cli.js';
|
||||
import { RolesPage } from '../pages/roles.js';
|
||||
import { expect } from '@playwright/test';
|
||||
|
||||
@@ -33,48 +31,33 @@ const columnHeaders = Object.freeze({
|
||||
|
||||
let org, rolesSortedByCreatedTime, rolesSortedByName, rolesSortedById;
|
||||
|
||||
test.beforeEach(
|
||||
async ({
|
||||
request,
|
||||
controllerAddr,
|
||||
adminAuthMethodId,
|
||||
adminLoginName,
|
||||
adminPassword,
|
||||
}) => {
|
||||
org = await boundaryHttp.createOrg(request);
|
||||
test.beforeEach(async ({ apiClient }) => {
|
||||
org = await apiClient.clients.Scope.scopeServiceCreateScope({
|
||||
item: {
|
||||
scopeId: 'global',
|
||||
},
|
||||
skipAdminRoleCreation: true,
|
||||
skipDefaultRoleCreation: true,
|
||||
});
|
||||
|
||||
await boundaryCli.authenticateBoundary(
|
||||
controllerAddr,
|
||||
adminAuthMethodId,
|
||||
adminLoginName,
|
||||
adminPassword,
|
||||
);
|
||||
// create roles with specific names
|
||||
const roles = await Promise.all(
|
||||
roleNamesToCreate.map((roleName) => {
|
||||
return apiClient.clients.Role.roleServiceCreateRole({
|
||||
item: {
|
||||
scopeId: org.id,
|
||||
name: roleName,
|
||||
},
|
||||
});
|
||||
}),
|
||||
);
|
||||
|
||||
// when the org is created some roles are created automatically, but for the purposes
|
||||
// of this sorting test it's clearer if only the roles created by the test are present
|
||||
const existingRolesToDelete = await boundaryCli.listRoles(org.id);
|
||||
for (const role of existingRolesToDelete) {
|
||||
await boundaryCli.deleteRole(role.id);
|
||||
}
|
||||
|
||||
// create roles with specific names
|
||||
for (const roleName of roleNamesToCreate) {
|
||||
boundaryCli.createRole(org.id, { name: roleName });
|
||||
}
|
||||
|
||||
// collect all roles and data so that sorting can be tested based on the underlying data
|
||||
const roles = await boundaryCli.listRoles(org.id);
|
||||
rolesSortedByCreatedTime = roles.toSorted((a, b) => {
|
||||
return new Date(b.created_time) - new Date(a.created_time);
|
||||
});
|
||||
rolesSortedByName = roles.toSorted((a, b) => a.name.localeCompare(b.name));
|
||||
rolesSortedById = roles.toSorted((a, b) => a.id.localeCompare(b.id));
|
||||
},
|
||||
);
|
||||
|
||||
test.afterEach(async ({ request }) => {
|
||||
// deletes the org and any associated roles
|
||||
await boundaryHttp.deleteOrg(request, org.id);
|
||||
// collect all roles and data so that sorting can be tested based on the underlying data
|
||||
rolesSortedByCreatedTime = roles.toSorted((a, b) => {
|
||||
return new Date(b.createdTime) - new Date(a.createdTime);
|
||||
});
|
||||
rolesSortedByName = roles.toSorted((a, b) => a.name.localeCompare(b.name));
|
||||
rolesSortedById = roles.toSorted((a, b) => a.id.localeCompare(b.id));
|
||||
});
|
||||
|
||||
test(
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
# OpenAPI Generator Ignore
|
||||
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
|
||||
|
||||
# Use this file to prevent files from being overwritten by the generator.
|
||||
# The patterns follow closely to .gitignore or .dockerignore.
|
||||
|
||||
# As an example, the C# client generator defines ApiClient.cs.
|
||||
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
|
||||
#ApiClient.cs
|
||||
|
||||
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
|
||||
#foo/*/qux
|
||||
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
|
||||
|
||||
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
|
||||
#foo/**/qux
|
||||
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
|
||||
|
||||
# You can also negate patterns with an exclamation (!).
|
||||
# For example, you can ignore all files in a docs folder with the file extension .md:
|
||||
#docs/*.md
|
||||
# Then explicitly reverse the ignore rule for a single file:
|
||||
#!docs/README.md
|
||||
@@ -0,0 +1,249 @@
|
||||
.openapi-generator-ignore
|
||||
apis/AccountServiceApi.ts
|
||||
apis/AliasServiceApi.ts
|
||||
apis/AuthMethodServiceApi.ts
|
||||
apis/AuthTokenServiceApi.ts
|
||||
apis/BillingServiceApi.ts
|
||||
apis/CredentialLibraryServiceApi.ts
|
||||
apis/CredentialServiceApi.ts
|
||||
apis/CredentialStoreServiceApi.ts
|
||||
apis/GroupServiceApi.ts
|
||||
apis/HostCatalogServiceApi.ts
|
||||
apis/HostServiceApi.ts
|
||||
apis/HostSetServiceApi.ts
|
||||
apis/ManagedGroupServiceApi.ts
|
||||
apis/PolicyServiceApi.ts
|
||||
apis/RoleServiceApi.ts
|
||||
apis/ScopeServiceApi.ts
|
||||
apis/SessionRecordingServiceApi.ts
|
||||
apis/SessionServiceApi.ts
|
||||
apis/StorageBucketServiceApi.ts
|
||||
apis/TargetServiceApi.ts
|
||||
apis/UserServiceApi.ts
|
||||
apis/WorkerServiceApi.ts
|
||||
apis/index.ts
|
||||
index.ts
|
||||
models/ControllerApiResourcesAccountsV1Account.ts
|
||||
models/ControllerApiResourcesAliasesV1Alias.ts
|
||||
models/ControllerApiResourcesAuthmethodsV1AuthMethod.ts
|
||||
models/ControllerApiResourcesAuthtokensV1AuthToken.ts
|
||||
models/ControllerApiResourcesBillingV1ActiveUsers.ts
|
||||
models/ControllerApiResourcesCredentiallibrariesV1CredentialLibrary.ts
|
||||
models/ControllerApiResourcesCredentialsV1Credential.ts
|
||||
models/ControllerApiResourcesCredentialstoresV1CredentialStore.ts
|
||||
models/ControllerApiResourcesGroupsV1Group.ts
|
||||
models/ControllerApiResourcesGroupsV1Member.ts
|
||||
models/ControllerApiResourcesHostcatalogsV1HostCatalog.ts
|
||||
models/ControllerApiResourcesHostsV1Host.ts
|
||||
models/ControllerApiResourcesHostsetsV1HostSet.ts
|
||||
models/ControllerApiResourcesManagedgroupsV1ManagedGroup.ts
|
||||
models/ControllerApiResourcesPluginsV1PluginInfo.ts
|
||||
models/ControllerApiResourcesPoliciesV1Policy.ts
|
||||
models/ControllerApiResourcesRolesV1Grant.ts
|
||||
models/ControllerApiResourcesRolesV1GrantJson.ts
|
||||
models/ControllerApiResourcesRolesV1Principal.ts
|
||||
models/ControllerApiResourcesRolesV1Role.ts
|
||||
models/ControllerApiResourcesScopesV1Key.ts
|
||||
models/ControllerApiResourcesScopesV1KeyVersion.ts
|
||||
models/ControllerApiResourcesScopesV1KeyVersionDestructionJob.ts
|
||||
models/ControllerApiResourcesScopesV1Scope.ts
|
||||
models/ControllerApiResourcesScopesV1ScopeInfo.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1ChannelRecording.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1ConnectionRecording.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1Credential.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1CredentialLibrary.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1CredentialStore.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1Host.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1HostCatalog.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1SessionRecording.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1Target.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1User.ts
|
||||
models/ControllerApiResourcesSessionrecordingsV1ValuesAtTime.ts
|
||||
models/ControllerApiResourcesSessionsV1Connection.ts
|
||||
models/ControllerApiResourcesSessionsV1Session.ts
|
||||
models/ControllerApiResourcesSessionsV1SessionState.ts
|
||||
models/ControllerApiResourcesStoragebucketsV1StorageBucket.ts
|
||||
models/ControllerApiResourcesTargetsV1Alias.ts
|
||||
models/ControllerApiResourcesTargetsV1AuthorizeSessionArguments.ts
|
||||
models/ControllerApiResourcesTargetsV1CredentialSource.ts
|
||||
models/ControllerApiResourcesTargetsV1HostSource.ts
|
||||
models/ControllerApiResourcesTargetsV1SessionAuthorization.ts
|
||||
models/ControllerApiResourcesTargetsV1SessionCredential.ts
|
||||
models/ControllerApiResourcesTargetsV1SessionSecret.ts
|
||||
models/ControllerApiResourcesTargetsV1Target.ts
|
||||
models/ControllerApiResourcesTargetsV1TargetAliasAttributes.ts
|
||||
models/ControllerApiResourcesUsersV1Account.ts
|
||||
models/ControllerApiResourcesUsersV1User.ts
|
||||
models/ControllerApiResourcesWorkersV1Certificate.ts
|
||||
models/ControllerApiResourcesWorkersV1CertificateAuthority.ts
|
||||
models/ControllerApiResourcesWorkersV1RemoteStoragePermissions.ts
|
||||
models/ControllerApiResourcesWorkersV1RemoteStorageState.ts
|
||||
models/ControllerApiResourcesWorkersV1Worker.ts
|
||||
models/ControllerApiServicesV1AccountServiceChangePasswordBody.ts
|
||||
models/ControllerApiServicesV1AccountServiceSetPasswordBody.ts
|
||||
models/ControllerApiServicesV1AddGroupMembersResponse.ts
|
||||
models/ControllerApiServicesV1AddHostSetHostsResponse.ts
|
||||
models/ControllerApiServicesV1AddRoleGrantScopesResponse.ts
|
||||
models/ControllerApiServicesV1AddRoleGrantsResponse.ts
|
||||
models/ControllerApiServicesV1AddRolePrincipalsResponse.ts
|
||||
models/ControllerApiServicesV1AddTargetCredentialSourcesResponse.ts
|
||||
models/ControllerApiServicesV1AddTargetHostSourcesResponse.ts
|
||||
models/ControllerApiServicesV1AddUserAccountsResponse.ts
|
||||
models/ControllerApiServicesV1AddWorkerTagsResponse.ts
|
||||
models/ControllerApiServicesV1AttachStoragePolicyResponse.ts
|
||||
models/ControllerApiServicesV1AuthMethodServiceAuthenticateBody.ts
|
||||
models/ControllerApiServicesV1AuthMethodServiceChangeStateBody.ts
|
||||
models/ControllerApiServicesV1AuthenticateResponse.ts
|
||||
models/ControllerApiServicesV1AuthorizeSessionResponse.ts
|
||||
models/ControllerApiServicesV1CancelSessionResponse.ts
|
||||
models/ControllerApiServicesV1ChangePasswordResponse.ts
|
||||
models/ControllerApiServicesV1ChangeStateResponse.ts
|
||||
models/ControllerApiServicesV1CreateAccountResponse.ts
|
||||
models/ControllerApiServicesV1CreateAliasResponse.ts
|
||||
models/ControllerApiServicesV1CreateAuthMethodResponse.ts
|
||||
models/ControllerApiServicesV1CreateControllerLedResponse.ts
|
||||
models/ControllerApiServicesV1CreateCredentialLibraryResponse.ts
|
||||
models/ControllerApiServicesV1CreateCredentialResponse.ts
|
||||
models/ControllerApiServicesV1CreateCredentialStoreResponse.ts
|
||||
models/ControllerApiServicesV1CreateGroupResponse.ts
|
||||
models/ControllerApiServicesV1CreateHostCatalogResponse.ts
|
||||
models/ControllerApiServicesV1CreateHostResponse.ts
|
||||
models/ControllerApiServicesV1CreateHostSetResponse.ts
|
||||
models/ControllerApiServicesV1CreateManagedGroupResponse.ts
|
||||
models/ControllerApiServicesV1CreatePolicyResponse.ts
|
||||
models/ControllerApiServicesV1CreateRoleResponse.ts
|
||||
models/ControllerApiServicesV1CreateScopeResponse.ts
|
||||
models/ControllerApiServicesV1CreateStorageBucketResponse.ts
|
||||
models/ControllerApiServicesV1CreateTargetResponse.ts
|
||||
models/ControllerApiServicesV1CreateUserResponse.ts
|
||||
models/ControllerApiServicesV1CreateWorkerLedResponse.ts
|
||||
models/ControllerApiServicesV1DestroyKeyVersionRequest.ts
|
||||
models/ControllerApiServicesV1DestroyKeyVersionResponse.ts
|
||||
models/ControllerApiServicesV1DetachStoragePolicyResponse.ts
|
||||
models/ControllerApiServicesV1GetAccountResponse.ts
|
||||
models/ControllerApiServicesV1GetAliasResponse.ts
|
||||
models/ControllerApiServicesV1GetAuthMethodResponse.ts
|
||||
models/ControllerApiServicesV1GetAuthTokenResponse.ts
|
||||
models/ControllerApiServicesV1GetCredentialLibraryResponse.ts
|
||||
models/ControllerApiServicesV1GetCredentialResponse.ts
|
||||
models/ControllerApiServicesV1GetCredentialStoreResponse.ts
|
||||
models/ControllerApiServicesV1GetGroupResponse.ts
|
||||
models/ControllerApiServicesV1GetHostCatalogResponse.ts
|
||||
models/ControllerApiServicesV1GetHostResponse.ts
|
||||
models/ControllerApiServicesV1GetHostSetResponse.ts
|
||||
models/ControllerApiServicesV1GetManagedGroupResponse.ts
|
||||
models/ControllerApiServicesV1GetPolicyResponse.ts
|
||||
models/ControllerApiServicesV1GetRoleResponse.ts
|
||||
models/ControllerApiServicesV1GetScopeResponse.ts
|
||||
models/ControllerApiServicesV1GetSessionRecordingResponse.ts
|
||||
models/ControllerApiServicesV1GetSessionResponse.ts
|
||||
models/ControllerApiServicesV1GetStorageBucketResponse.ts
|
||||
models/ControllerApiServicesV1GetTargetResponse.ts
|
||||
models/ControllerApiServicesV1GetUserResponse.ts
|
||||
models/ControllerApiServicesV1GetWorkerResponse.ts
|
||||
models/ControllerApiServicesV1GroupServiceAddGroupMembersBody.ts
|
||||
models/ControllerApiServicesV1GroupServiceRemoveGroupMembersBody.ts
|
||||
models/ControllerApiServicesV1GroupServiceSetGroupMembersBody.ts
|
||||
models/ControllerApiServicesV1HostSetServiceAddHostSetHostsBody.ts
|
||||
models/ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody.ts
|
||||
models/ControllerApiServicesV1HostSetServiceSetHostSetHostsBody.ts
|
||||
models/ControllerApiServicesV1ListAccountsResponse.ts
|
||||
models/ControllerApiServicesV1ListAliasesResponse.ts
|
||||
models/ControllerApiServicesV1ListAuthMethodsResponse.ts
|
||||
models/ControllerApiServicesV1ListAuthTokensResponse.ts
|
||||
models/ControllerApiServicesV1ListCredentialLibrariesResponse.ts
|
||||
models/ControllerApiServicesV1ListCredentialStoresResponse.ts
|
||||
models/ControllerApiServicesV1ListCredentialsResponse.ts
|
||||
models/ControllerApiServicesV1ListGroupsResponse.ts
|
||||
models/ControllerApiServicesV1ListHostCatalogsResponse.ts
|
||||
models/ControllerApiServicesV1ListHostSetsResponse.ts
|
||||
models/ControllerApiServicesV1ListHostsResponse.ts
|
||||
models/ControllerApiServicesV1ListKeyVersionDestructionJobsResponse.ts
|
||||
models/ControllerApiServicesV1ListKeysResponse.ts
|
||||
models/ControllerApiServicesV1ListManagedGroupsResponse.ts
|
||||
models/ControllerApiServicesV1ListPoliciesResponse.ts
|
||||
models/ControllerApiServicesV1ListResolvableAliasesResponse.ts
|
||||
models/ControllerApiServicesV1ListRolesResponse.ts
|
||||
models/ControllerApiServicesV1ListScopesResponse.ts
|
||||
models/ControllerApiServicesV1ListSessionRecordingsResponse.ts
|
||||
models/ControllerApiServicesV1ListSessionsResponse.ts
|
||||
models/ControllerApiServicesV1ListStorageBucketsResponse.ts
|
||||
models/ControllerApiServicesV1ListTargetsResponse.ts
|
||||
models/ControllerApiServicesV1ListUsersResponse.ts
|
||||
models/ControllerApiServicesV1ListWorkersResponse.ts
|
||||
models/ControllerApiServicesV1MonthlyActiveUsersResponse.ts
|
||||
models/ControllerApiServicesV1ReApplyStoragePolicyResponse.ts
|
||||
models/ControllerApiServicesV1ReadCertificateAuthorityResponse.ts
|
||||
models/ControllerApiServicesV1ReinitializeCertificateAuthorityResponse.ts
|
||||
models/ControllerApiServicesV1RemoveGroupMembersResponse.ts
|
||||
models/ControllerApiServicesV1RemoveHostSetHostsResponse.ts
|
||||
models/ControllerApiServicesV1RemoveRoleGrantScopesResponse.ts
|
||||
models/ControllerApiServicesV1RemoveRoleGrantsResponse.ts
|
||||
models/ControllerApiServicesV1RemoveRolePrincipalsResponse.ts
|
||||
models/ControllerApiServicesV1RemoveTargetCredentialSourcesResponse.ts
|
||||
models/ControllerApiServicesV1RemoveTargetHostSourcesResponse.ts
|
||||
models/ControllerApiServicesV1RemoveUserAccountsResponse.ts
|
||||
models/ControllerApiServicesV1RemoveWorkerTagsResponse.ts
|
||||
models/ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody.ts
|
||||
models/ControllerApiServicesV1RoleServiceAddRoleGrantsBody.ts
|
||||
models/ControllerApiServicesV1RoleServiceAddRolePrincipalsBody.ts
|
||||
models/ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody.ts
|
||||
models/ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody.ts
|
||||
models/ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody.ts
|
||||
models/ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody.ts
|
||||
models/ControllerApiServicesV1RoleServiceSetRoleGrantsBody.ts
|
||||
models/ControllerApiServicesV1RoleServiceSetRolePrincipalsBody.ts
|
||||
models/ControllerApiServicesV1RotateKeysRequest.ts
|
||||
models/ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody.ts
|
||||
models/ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody.ts
|
||||
models/ControllerApiServicesV1SessionServiceCancelSessionBody.ts
|
||||
models/ControllerApiServicesV1SetGroupMembersResponse.ts
|
||||
models/ControllerApiServicesV1SetHostSetHostsResponse.ts
|
||||
models/ControllerApiServicesV1SetPasswordResponse.ts
|
||||
models/ControllerApiServicesV1SetRoleGrantScopesResponse.ts
|
||||
models/ControllerApiServicesV1SetRoleGrantsResponse.ts
|
||||
models/ControllerApiServicesV1SetRolePrincipalsResponse.ts
|
||||
models/ControllerApiServicesV1SetTargetCredentialSourcesResponse.ts
|
||||
models/ControllerApiServicesV1SetTargetHostSourcesResponse.ts
|
||||
models/ControllerApiServicesV1SetUserAccountsResponse.ts
|
||||
models/ControllerApiServicesV1SetWorkerTagsResponse.ts
|
||||
models/ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody.ts
|
||||
models/ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody.ts
|
||||
models/ControllerApiServicesV1TargetServiceAuthorizeSessionBody.ts
|
||||
models/ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody.ts
|
||||
models/ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody.ts
|
||||
models/ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody.ts
|
||||
models/ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody.ts
|
||||
models/ControllerApiServicesV1UpdateAccountResponse.ts
|
||||
models/ControllerApiServicesV1UpdateAliasResponse.ts
|
||||
models/ControllerApiServicesV1UpdateAuthMethodResponse.ts
|
||||
models/ControllerApiServicesV1UpdateCredentialLibraryResponse.ts
|
||||
models/ControllerApiServicesV1UpdateCredentialResponse.ts
|
||||
models/ControllerApiServicesV1UpdateCredentialStoreResponse.ts
|
||||
models/ControllerApiServicesV1UpdateGroupResponse.ts
|
||||
models/ControllerApiServicesV1UpdateHostCatalogResponse.ts
|
||||
models/ControllerApiServicesV1UpdateHostResponse.ts
|
||||
models/ControllerApiServicesV1UpdateHostSetResponse.ts
|
||||
models/ControllerApiServicesV1UpdateManagedGroupResponse.ts
|
||||
models/ControllerApiServicesV1UpdatePolicyResponse.ts
|
||||
models/ControllerApiServicesV1UpdateRoleResponse.ts
|
||||
models/ControllerApiServicesV1UpdateScopeResponse.ts
|
||||
models/ControllerApiServicesV1UpdateStorageBucketResponse.ts
|
||||
models/ControllerApiServicesV1UpdateTargetResponse.ts
|
||||
models/ControllerApiServicesV1UpdateUserResponse.ts
|
||||
models/ControllerApiServicesV1UpdateWorkerResponse.ts
|
||||
models/ControllerApiServicesV1UserServiceAddUserAccountsBody.ts
|
||||
models/ControllerApiServicesV1UserServiceRemoveUserAccountsBody.ts
|
||||
models/ControllerApiServicesV1UserServiceSetUserAccountsBody.ts
|
||||
models/ControllerApiServicesV1WorkerServiceAddWorkerTagsBody.ts
|
||||
models/ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody.ts
|
||||
models/ControllerApiServicesV1WorkerServiceSetWorkerTagsBody.ts
|
||||
models/ControllerApiV1Error.ts
|
||||
models/ControllerApiV1ErrorDetails.ts
|
||||
models/ControllerApiV1FieldError.ts
|
||||
models/ControllerApiV1WrappedError.ts
|
||||
models/GoogleApiHttpBody.ts
|
||||
models/GoogleProtobufAny.ts
|
||||
models/GoogleProtobufNullValue.ts
|
||||
models/index.ts
|
||||
runtime.ts
|
||||
@@ -0,0 +1 @@
|
||||
7.13.0
|
||||
@@ -0,0 +1,377 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesAccountsV1Account,
|
||||
ControllerApiServicesV1AccountServiceChangePasswordBody,
|
||||
ControllerApiServicesV1AccountServiceSetPasswordBody,
|
||||
ControllerApiServicesV1ListAccountsResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesAccountsV1AccountFromJSON,
|
||||
ControllerApiResourcesAccountsV1AccountToJSON,
|
||||
ControllerApiServicesV1AccountServiceChangePasswordBodyFromJSON,
|
||||
ControllerApiServicesV1AccountServiceChangePasswordBodyToJSON,
|
||||
ControllerApiServicesV1AccountServiceSetPasswordBodyFromJSON,
|
||||
ControllerApiServicesV1AccountServiceSetPasswordBodyToJSON,
|
||||
ControllerApiServicesV1ListAccountsResponseFromJSON,
|
||||
ControllerApiServicesV1ListAccountsResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface AccountServiceChangePasswordRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1AccountServiceChangePasswordBody;
|
||||
}
|
||||
|
||||
export interface AccountServiceCreateAccountRequest {
|
||||
item: Omit<ControllerApiResourcesAccountsV1Account, 'id'|'created_time'|'updated_time'|'managed_group_ids'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
export interface AccountServiceDeleteAccountRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AccountServiceGetAccountRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AccountServiceListAccountsRequest {
|
||||
authMethodId?: string;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface AccountServiceSetPasswordRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1AccountServiceSetPasswordBody;
|
||||
}
|
||||
|
||||
export interface AccountServiceUpdateAccountRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesAccountsV1Account, 'id'|'created_time'|'updated_time'|'managed_group_ids'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class AccountServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Sets the password for the provided account.
|
||||
*/
|
||||
async accountServiceChangePasswordRaw(requestParameters: AccountServiceChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAccountsV1Account>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling accountServiceChangePassword().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling accountServiceChangePassword().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/accounts/{id}:change-password`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1AccountServiceChangePasswordBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAccountsV1AccountFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the password for the provided account.
|
||||
*/
|
||||
async accountServiceChangePassword(requestParameters: AccountServiceChangePasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAccountsV1Account> {
|
||||
const response = await this.accountServiceChangePasswordRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single account in the provided auth method.
|
||||
*/
|
||||
async accountServiceCreateAccountRaw(requestParameters: AccountServiceCreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAccountsV1Account>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling accountServiceCreateAccount().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/accounts`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesAccountsV1AccountToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAccountsV1AccountFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single account in the provided auth method.
|
||||
*/
|
||||
async accountServiceCreateAccount(requestParameters: AccountServiceCreateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAccountsV1Account> {
|
||||
const response = await this.accountServiceCreateAccountRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an account.
|
||||
*/
|
||||
async accountServiceDeleteAccountRaw(requestParameters: AccountServiceDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling accountServiceDeleteAccount().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/accounts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an account.
|
||||
*/
|
||||
async accountServiceDeleteAccount(requestParameters: AccountServiceDeleteAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.accountServiceDeleteAccountRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single account based on the input ID
|
||||
*/
|
||||
async accountServiceGetAccountRaw(requestParameters: AccountServiceGetAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAccountsV1Account>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling accountServiceGetAccount().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/accounts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAccountsV1AccountFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single account based on the input ID
|
||||
*/
|
||||
async accountServiceGetAccount(requestParameters: AccountServiceGetAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAccountsV1Account> {
|
||||
const response = await this.accountServiceGetAccountRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all accounts in a specific auth method.
|
||||
*/
|
||||
async accountServiceListAccountsRaw(requestParameters: AccountServiceListAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListAccountsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['authMethodId'] != null) {
|
||||
queryParameters['auth_method_id'] = requestParameters['authMethodId'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/accounts`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListAccountsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all accounts in a specific auth method.
|
||||
*/
|
||||
async accountServiceListAccounts(requestParameters: AccountServiceListAccountsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListAccountsResponse> {
|
||||
const response = await this.accountServiceListAccountsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the password for the provided account.
|
||||
*/
|
||||
async accountServiceSetPasswordRaw(requestParameters: AccountServiceSetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAccountsV1Account>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling accountServiceSetPassword().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling accountServiceSetPassword().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/accounts/{id}:set-password`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1AccountServiceSetPasswordBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAccountsV1AccountFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the password for the provided account.
|
||||
*/
|
||||
async accountServiceSetPassword(requestParameters: AccountServiceSetPasswordRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAccountsV1Account> {
|
||||
const response = await this.accountServiceSetPasswordRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an account.
|
||||
*/
|
||||
async accountServiceUpdateAccountRaw(requestParameters: AccountServiceUpdateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAccountsV1Account>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling accountServiceUpdateAccount().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling accountServiceUpdateAccount().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/accounts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesAccountsV1AccountToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAccountsV1AccountFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an account.
|
||||
*/
|
||||
async accountServiceUpdateAccount(requestParameters: AccountServiceUpdateAccountRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAccountsV1Account> {
|
||||
const response = await this.accountServiceUpdateAccountRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesAliasesV1Alias,
|
||||
ControllerApiServicesV1ListAliasesResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesAliasesV1AliasFromJSON,
|
||||
ControllerApiResourcesAliasesV1AliasToJSON,
|
||||
ControllerApiServicesV1ListAliasesResponseFromJSON,
|
||||
ControllerApiServicesV1ListAliasesResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface AliasServiceCreateAliasRequest {
|
||||
item: Omit<ControllerApiResourcesAliasesV1Alias, 'id'|'created_time'|'updated_time'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
export interface AliasServiceDeleteAliasRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AliasServiceGetAliasRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AliasServiceListAliasesRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface AliasServiceUpdateAliasRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesAliasesV1Alias, 'id'|'created_time'|'updated_time'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class AliasServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates a single Alias in the provided scope.
|
||||
*/
|
||||
async aliasServiceCreateAliasRaw(requestParameters: AliasServiceCreateAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAliasesV1Alias>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling aliasServiceCreateAlias().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/aliases`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesAliasesV1AliasToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAliasesV1AliasFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Alias in the provided scope.
|
||||
*/
|
||||
async aliasServiceCreateAlias(requestParameters: AliasServiceCreateAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAliasesV1Alias> {
|
||||
const response = await this.aliasServiceCreateAliasRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an Alias.
|
||||
*/
|
||||
async aliasServiceDeleteAliasRaw(requestParameters: AliasServiceDeleteAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling aliasServiceDeleteAlias().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/aliases/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an Alias.
|
||||
*/
|
||||
async aliasServiceDeleteAlias(requestParameters: AliasServiceDeleteAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.aliasServiceDeleteAliasRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Alias.
|
||||
*/
|
||||
async aliasServiceGetAliasRaw(requestParameters: AliasServiceGetAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAliasesV1Alias>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling aliasServiceGetAlias().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/aliases/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAliasesV1AliasFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Alias.
|
||||
*/
|
||||
async aliasServiceGetAlias(requestParameters: AliasServiceGetAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAliasesV1Alias> {
|
||||
const response = await this.aliasServiceGetAliasRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Aliases in a specific Scope.
|
||||
*/
|
||||
async aliasServiceListAliasesRaw(requestParameters: AliasServiceListAliasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListAliasesResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/aliases`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListAliasesResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Aliases in a specific Scope.
|
||||
*/
|
||||
async aliasServiceListAliases(requestParameters: AliasServiceListAliasesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListAliasesResponse> {
|
||||
const response = await this.aliasServiceListAliasesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an Alias.
|
||||
*/
|
||||
async aliasServiceUpdateAliasRaw(requestParameters: AliasServiceUpdateAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAliasesV1Alias>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling aliasServiceUpdateAlias().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling aliasServiceUpdateAlias().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/aliases/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesAliasesV1AliasToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAliasesV1AliasFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an Alias.
|
||||
*/
|
||||
async aliasServiceUpdateAlias(requestParameters: AliasServiceUpdateAliasRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAliasesV1Alias> {
|
||||
const response = await this.aliasServiceUpdateAliasRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,385 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesAuthmethodsV1AuthMethod,
|
||||
ControllerApiServicesV1AuthMethodServiceAuthenticateBody,
|
||||
ControllerApiServicesV1AuthMethodServiceChangeStateBody,
|
||||
ControllerApiServicesV1AuthenticateResponse,
|
||||
ControllerApiServicesV1ListAuthMethodsResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON,
|
||||
ControllerApiResourcesAuthmethodsV1AuthMethodToJSON,
|
||||
ControllerApiServicesV1AuthMethodServiceAuthenticateBodyFromJSON,
|
||||
ControllerApiServicesV1AuthMethodServiceAuthenticateBodyToJSON,
|
||||
ControllerApiServicesV1AuthMethodServiceChangeStateBodyFromJSON,
|
||||
ControllerApiServicesV1AuthMethodServiceChangeStateBodyToJSON,
|
||||
ControllerApiServicesV1AuthenticateResponseFromJSON,
|
||||
ControllerApiServicesV1AuthenticateResponseToJSON,
|
||||
ControllerApiServicesV1ListAuthMethodsResponseFromJSON,
|
||||
ControllerApiServicesV1ListAuthMethodsResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface AuthMethodServiceAuthenticateRequest {
|
||||
authMethodId: string;
|
||||
body: ControllerApiServicesV1AuthMethodServiceAuthenticateBody;
|
||||
}
|
||||
|
||||
export interface AuthMethodServiceChangeStateRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1AuthMethodServiceChangeStateBody;
|
||||
}
|
||||
|
||||
export interface AuthMethodServiceCreateAuthMethodRequest {
|
||||
item: Omit<ControllerApiResourcesAuthmethodsV1AuthMethod, 'id'|'created_time'|'updated_time'|'is_primary'|'authorized_actions'|'authorized_collection_actions'>;
|
||||
}
|
||||
|
||||
export interface AuthMethodServiceDeleteAuthMethodRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AuthMethodServiceGetAuthMethodRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AuthMethodServiceListAuthMethodsRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface AuthMethodServiceUpdateAuthMethodRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesAuthmethodsV1AuthMethod, 'id'|'created_time'|'updated_time'|'is_primary'|'authorized_actions'|'authorized_collection_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class AuthMethodServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Authenticate a user to an scope and retrieve an authentication token.
|
||||
*/
|
||||
async authMethodServiceAuthenticateRaw(requestParameters: AuthMethodServiceAuthenticateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1AuthenticateResponse>> {
|
||||
if (requestParameters['authMethodId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'authMethodId',
|
||||
'Required parameter "authMethodId" was null or undefined when calling authMethodServiceAuthenticate().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling authMethodServiceAuthenticate().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/auth-methods/{auth_method_id}:authenticate`.replace(`{${"auth_method_id"}}`, encodeURIComponent(String(requestParameters['authMethodId']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1AuthMethodServiceAuthenticateBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1AuthenticateResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Authenticate a user to an scope and retrieve an authentication token.
|
||||
*/
|
||||
async authMethodServiceAuthenticate(requestParameters: AuthMethodServiceAuthenticateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1AuthenticateResponse> {
|
||||
const response = await this.authMethodServiceAuthenticateRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the state of an OIDC AuthMethod
|
||||
*/
|
||||
async authMethodServiceChangeStateRaw(requestParameters: AuthMethodServiceChangeStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAuthmethodsV1AuthMethod>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling authMethodServiceChangeState().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling authMethodServiceChangeState().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/auth-methods/{id}:change-state`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1AuthMethodServiceChangeStateBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the state of an OIDC AuthMethod
|
||||
*/
|
||||
async authMethodServiceChangeState(requestParameters: AuthMethodServiceChangeStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAuthmethodsV1AuthMethod> {
|
||||
const response = await this.authMethodServiceChangeStateRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single auth method.
|
||||
*/
|
||||
async authMethodServiceCreateAuthMethodRaw(requestParameters: AuthMethodServiceCreateAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAuthmethodsV1AuthMethod>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling authMethodServiceCreateAuthMethod().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/auth-methods`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesAuthmethodsV1AuthMethodToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single auth method.
|
||||
*/
|
||||
async authMethodServiceCreateAuthMethod(requestParameters: AuthMethodServiceCreateAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAuthmethodsV1AuthMethod> {
|
||||
const response = await this.authMethodServiceCreateAuthMethodRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an AuthMethod
|
||||
*/
|
||||
async authMethodServiceDeleteAuthMethodRaw(requestParameters: AuthMethodServiceDeleteAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling authMethodServiceDeleteAuthMethod().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/auth-methods/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an AuthMethod
|
||||
*/
|
||||
async authMethodServiceDeleteAuthMethod(requestParameters: AuthMethodServiceDeleteAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.authMethodServiceDeleteAuthMethodRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single auth method.
|
||||
*/
|
||||
async authMethodServiceGetAuthMethodRaw(requestParameters: AuthMethodServiceGetAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAuthmethodsV1AuthMethod>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling authMethodServiceGetAuthMethod().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/auth-methods/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single auth method.
|
||||
*/
|
||||
async authMethodServiceGetAuthMethod(requestParameters: AuthMethodServiceGetAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAuthmethodsV1AuthMethod> {
|
||||
const response = await this.authMethodServiceGetAuthMethodRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all auth methods.
|
||||
*/
|
||||
async authMethodServiceListAuthMethodsRaw(requestParameters: AuthMethodServiceListAuthMethodsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListAuthMethodsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/auth-methods`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListAuthMethodsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all auth methods.
|
||||
*/
|
||||
async authMethodServiceListAuthMethods(requestParameters: AuthMethodServiceListAuthMethodsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListAuthMethodsResponse> {
|
||||
const response = await this.authMethodServiceListAuthMethodsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an auth method.
|
||||
*/
|
||||
async authMethodServiceUpdateAuthMethodRaw(requestParameters: AuthMethodServiceUpdateAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAuthmethodsV1AuthMethod>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling authMethodServiceUpdateAuthMethod().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling authMethodServiceUpdateAuthMethod().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/auth-methods/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesAuthmethodsV1AuthMethodToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an auth method.
|
||||
*/
|
||||
async authMethodServiceUpdateAuthMethod(requestParameters: AuthMethodServiceUpdateAuthMethodRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAuthmethodsV1AuthMethod> {
|
||||
const response = await this.authMethodServiceUpdateAuthMethodRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,176 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesAuthtokensV1AuthToken,
|
||||
ControllerApiServicesV1ListAuthTokensResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesAuthtokensV1AuthTokenFromJSON,
|
||||
ControllerApiResourcesAuthtokensV1AuthTokenToJSON,
|
||||
ControllerApiServicesV1ListAuthTokensResponseFromJSON,
|
||||
ControllerApiServicesV1ListAuthTokensResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface AuthTokenServiceDeleteAuthTokenRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AuthTokenServiceGetAuthTokenRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface AuthTokenServiceListAuthTokensRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class AuthTokenServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Deletes an Auth Token.
|
||||
*/
|
||||
async authTokenServiceDeleteAuthTokenRaw(requestParameters: AuthTokenServiceDeleteAuthTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling authTokenServiceDeleteAuthToken().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/auth-tokens/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an Auth Token.
|
||||
*/
|
||||
async authTokenServiceDeleteAuthToken(requestParameters: AuthTokenServiceDeleteAuthTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.authTokenServiceDeleteAuthTokenRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Auth Token.
|
||||
*/
|
||||
async authTokenServiceGetAuthTokenRaw(requestParameters: AuthTokenServiceGetAuthTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesAuthtokensV1AuthToken>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling authTokenServiceGetAuthToken().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/auth-tokens/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesAuthtokensV1AuthTokenFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Auth Token.
|
||||
*/
|
||||
async authTokenServiceGetAuthToken(requestParameters: AuthTokenServiceGetAuthTokenRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesAuthtokensV1AuthToken> {
|
||||
const response = await this.authTokenServiceGetAuthTokenRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Auth Tokens.
|
||||
*/
|
||||
async authTokenServiceListAuthTokensRaw(requestParameters: AuthTokenServiceListAuthTokensRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListAuthTokensResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/auth-tokens`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListAuthTokensResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Auth Tokens.
|
||||
*/
|
||||
async authTokenServiceListAuthTokens(requestParameters: AuthTokenServiceListAuthTokensRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListAuthTokensResponse> {
|
||||
const response = await this.authTokenServiceListAuthTokensRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiServicesV1MonthlyActiveUsersResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiServicesV1MonthlyActiveUsersResponseFromJSON,
|
||||
ControllerApiServicesV1MonthlyActiveUsersResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface BillingServiceMonthlyActiveUsersRequest {
|
||||
startTime?: string;
|
||||
endTime?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class BillingServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Returns monthly active users.
|
||||
*/
|
||||
async billingServiceMonthlyActiveUsersRaw(requestParameters: BillingServiceMonthlyActiveUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1MonthlyActiveUsersResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['startTime'] != null) {
|
||||
queryParameters['start_time'] = requestParameters['startTime'];
|
||||
}
|
||||
|
||||
if (requestParameters['endTime'] != null) {
|
||||
queryParameters['end_time'] = requestParameters['endTime'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/billing:monthly-active-users`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1MonthlyActiveUsersResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns monthly active users.
|
||||
*/
|
||||
async billingServiceMonthlyActiveUsers(requestParameters: BillingServiceMonthlyActiveUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1MonthlyActiveUsersResponse> {
|
||||
const response = await this.billingServiceMonthlyActiveUsersRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesCredentiallibrariesV1CredentialLibrary,
|
||||
ControllerApiServicesV1ListCredentialLibrariesResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON,
|
||||
ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON,
|
||||
ControllerApiServicesV1ListCredentialLibrariesResponseFromJSON,
|
||||
ControllerApiServicesV1ListCredentialLibrariesResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface CredentialLibraryServiceCreateCredentialLibraryRequest {
|
||||
item: Omit<ControllerApiResourcesCredentiallibrariesV1CredentialLibrary, 'id'|'created_time'|'updated_time'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
export interface CredentialLibraryServiceDeleteCredentialLibraryRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface CredentialLibraryServiceGetCredentialLibraryRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface CredentialLibraryServiceListCredentialLibrariesRequest {
|
||||
credentialStoreId?: string;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface CredentialLibraryServiceUpdateCredentialLibraryRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesCredentiallibrariesV1CredentialLibrary, 'id'|'created_time'|'updated_time'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class CredentialLibraryServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates a single Credential Library.
|
||||
*/
|
||||
async credentialLibraryServiceCreateCredentialLibraryRaw(requestParameters: CredentialLibraryServiceCreateCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesCredentiallibrariesV1CredentialLibrary>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling credentialLibraryServiceCreateCredentialLibrary().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credential-libraries`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Credential Library.
|
||||
*/
|
||||
async credentialLibraryServiceCreateCredentialLibrary(requestParameters: CredentialLibraryServiceCreateCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesCredentiallibrariesV1CredentialLibrary> {
|
||||
const response = await this.credentialLibraryServiceCreateCredentialLibraryRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Credential Library
|
||||
*/
|
||||
async credentialLibraryServiceDeleteCredentialLibraryRaw(requestParameters: CredentialLibraryServiceDeleteCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling credentialLibraryServiceDeleteCredentialLibrary().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credential-libraries/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Credential Library
|
||||
*/
|
||||
async credentialLibraryServiceDeleteCredentialLibrary(requestParameters: CredentialLibraryServiceDeleteCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.credentialLibraryServiceDeleteCredentialLibraryRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Credential Library.
|
||||
*/
|
||||
async credentialLibraryServiceGetCredentialLibraryRaw(requestParameters: CredentialLibraryServiceGetCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesCredentiallibrariesV1CredentialLibrary>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling credentialLibraryServiceGetCredentialLibrary().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credential-libraries/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Credential Library.
|
||||
*/
|
||||
async credentialLibraryServiceGetCredentialLibrary(requestParameters: CredentialLibraryServiceGetCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesCredentiallibrariesV1CredentialLibrary> {
|
||||
const response = await this.credentialLibraryServiceGetCredentialLibraryRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Credential Library.
|
||||
*/
|
||||
async credentialLibraryServiceListCredentialLibrariesRaw(requestParameters: CredentialLibraryServiceListCredentialLibrariesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListCredentialLibrariesResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['credentialStoreId'] != null) {
|
||||
queryParameters['credential_store_id'] = requestParameters['credentialStoreId'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credential-libraries`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListCredentialLibrariesResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Credential Library.
|
||||
*/
|
||||
async credentialLibraryServiceListCredentialLibraries(requestParameters: CredentialLibraryServiceListCredentialLibrariesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListCredentialLibrariesResponse> {
|
||||
const response = await this.credentialLibraryServiceListCredentialLibrariesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Credential Library.
|
||||
*/
|
||||
async credentialLibraryServiceUpdateCredentialLibraryRaw(requestParameters: CredentialLibraryServiceUpdateCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesCredentiallibrariesV1CredentialLibrary>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling credentialLibraryServiceUpdateCredentialLibrary().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling credentialLibraryServiceUpdateCredentialLibrary().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credential-libraries/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Credential Library.
|
||||
*/
|
||||
async credentialLibraryServiceUpdateCredentialLibrary(requestParameters: CredentialLibraryServiceUpdateCredentialLibraryRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesCredentiallibrariesV1CredentialLibrary> {
|
||||
const response = await this.credentialLibraryServiceUpdateCredentialLibraryRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesCredentialsV1Credential,
|
||||
ControllerApiServicesV1ListCredentialsResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesCredentialsV1CredentialFromJSON,
|
||||
ControllerApiResourcesCredentialsV1CredentialToJSON,
|
||||
ControllerApiServicesV1ListCredentialsResponseFromJSON,
|
||||
ControllerApiServicesV1ListCredentialsResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface CredentialServiceCreateCredentialRequest {
|
||||
item: Omit<ControllerApiResourcesCredentialsV1Credential, 'id'|'created_time'|'updated_time'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
export interface CredentialServiceDeleteCredentialRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface CredentialServiceGetCredentialRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface CredentialServiceListCredentialsRequest {
|
||||
credentialStoreId?: string;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface CredentialServiceUpdateCredentialRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesCredentialsV1Credential, 'id'|'created_time'|'updated_time'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class CredentialServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates a single Credential.
|
||||
*/
|
||||
async credentialServiceCreateCredentialRaw(requestParameters: CredentialServiceCreateCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesCredentialsV1Credential>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling credentialServiceCreateCredential().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credentials`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesCredentialsV1CredentialToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialsV1CredentialFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Credential.
|
||||
*/
|
||||
async credentialServiceCreateCredential(requestParameters: CredentialServiceCreateCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesCredentialsV1Credential> {
|
||||
const response = await this.credentialServiceCreateCredentialRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Credential
|
||||
*/
|
||||
async credentialServiceDeleteCredentialRaw(requestParameters: CredentialServiceDeleteCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling credentialServiceDeleteCredential().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credentials/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Credential
|
||||
*/
|
||||
async credentialServiceDeleteCredential(requestParameters: CredentialServiceDeleteCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.credentialServiceDeleteCredentialRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Credential.
|
||||
*/
|
||||
async credentialServiceGetCredentialRaw(requestParameters: CredentialServiceGetCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesCredentialsV1Credential>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling credentialServiceGetCredential().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credentials/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialsV1CredentialFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Credential.
|
||||
*/
|
||||
async credentialServiceGetCredential(requestParameters: CredentialServiceGetCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesCredentialsV1Credential> {
|
||||
const response = await this.credentialServiceGetCredentialRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Credentials.
|
||||
*/
|
||||
async credentialServiceListCredentialsRaw(requestParameters: CredentialServiceListCredentialsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListCredentialsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['credentialStoreId'] != null) {
|
||||
queryParameters['credential_store_id'] = requestParameters['credentialStoreId'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credentials`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListCredentialsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Credentials.
|
||||
*/
|
||||
async credentialServiceListCredentials(requestParameters: CredentialServiceListCredentialsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListCredentialsResponse> {
|
||||
const response = await this.credentialServiceListCredentialsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Credential.
|
||||
*/
|
||||
async credentialServiceUpdateCredentialRaw(requestParameters: CredentialServiceUpdateCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesCredentialsV1Credential>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling credentialServiceUpdateCredential().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling credentialServiceUpdateCredential().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credentials/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesCredentialsV1CredentialToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialsV1CredentialFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Credential.
|
||||
*/
|
||||
async credentialServiceUpdateCredential(requestParameters: CredentialServiceUpdateCredentialRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesCredentialsV1Credential> {
|
||||
const response = await this.credentialServiceUpdateCredentialRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesCredentialstoresV1CredentialStore,
|
||||
ControllerApiServicesV1ListCredentialStoresResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON,
|
||||
ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON,
|
||||
ControllerApiServicesV1ListCredentialStoresResponseFromJSON,
|
||||
ControllerApiServicesV1ListCredentialStoresResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface CredentialStoreServiceCreateCredentialStoreRequest {
|
||||
item: Omit<ControllerApiResourcesCredentialstoresV1CredentialStore, 'id'|'created_time'|'updated_time'|'authorized_actions'|'authorized_collection_actions'>;
|
||||
}
|
||||
|
||||
export interface CredentialStoreServiceDeleteCredentialStoreRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface CredentialStoreServiceGetCredentialStoreRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface CredentialStoreServiceListCredentialStoresRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface CredentialStoreServiceUpdateCredentialStoreRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesCredentialstoresV1CredentialStore, 'id'|'created_time'|'updated_time'|'authorized_actions'|'authorized_collection_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class CredentialStoreServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates a single Credential Store.
|
||||
*/
|
||||
async credentialStoreServiceCreateCredentialStoreRaw(requestParameters: CredentialStoreServiceCreateCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesCredentialstoresV1CredentialStore>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling credentialStoreServiceCreateCredentialStore().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credential-stores`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Credential Store.
|
||||
*/
|
||||
async credentialStoreServiceCreateCredentialStore(requestParameters: CredentialStoreServiceCreateCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesCredentialstoresV1CredentialStore> {
|
||||
const response = await this.credentialStoreServiceCreateCredentialStoreRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a CredentialStore
|
||||
*/
|
||||
async credentialStoreServiceDeleteCredentialStoreRaw(requestParameters: CredentialStoreServiceDeleteCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling credentialStoreServiceDeleteCredentialStore().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credential-stores/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a CredentialStore
|
||||
*/
|
||||
async credentialStoreServiceDeleteCredentialStore(requestParameters: CredentialStoreServiceDeleteCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.credentialStoreServiceDeleteCredentialStoreRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Credential Store.
|
||||
*/
|
||||
async credentialStoreServiceGetCredentialStoreRaw(requestParameters: CredentialStoreServiceGetCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesCredentialstoresV1CredentialStore>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling credentialStoreServiceGetCredentialStore().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credential-stores/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Credential Store.
|
||||
*/
|
||||
async credentialStoreServiceGetCredentialStore(requestParameters: CredentialStoreServiceGetCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesCredentialstoresV1CredentialStore> {
|
||||
const response = await this.credentialStoreServiceGetCredentialStoreRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Credential Stores.
|
||||
*/
|
||||
async credentialStoreServiceListCredentialStoresRaw(requestParameters: CredentialStoreServiceListCredentialStoresRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListCredentialStoresResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credential-stores`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListCredentialStoresResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Credential Stores.
|
||||
*/
|
||||
async credentialStoreServiceListCredentialStores(requestParameters: CredentialStoreServiceListCredentialStoresRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListCredentialStoresResponse> {
|
||||
const response = await this.credentialStoreServiceListCredentialStoresRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Credential Store.
|
||||
*/
|
||||
async credentialStoreServiceUpdateCredentialStoreRaw(requestParameters: CredentialStoreServiceUpdateCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesCredentialstoresV1CredentialStore>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling credentialStoreServiceUpdateCredentialStore().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling credentialStoreServiceUpdateCredentialStore().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/credential-stores/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Credential Store.
|
||||
*/
|
||||
async credentialStoreServiceUpdateCredentialStore(requestParameters: CredentialStoreServiceUpdateCredentialStoreRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesCredentialstoresV1CredentialStore> {
|
||||
const response = await this.credentialStoreServiceUpdateCredentialStoreRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,437 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesGroupsV1Group,
|
||||
ControllerApiServicesV1GroupServiceAddGroupMembersBody,
|
||||
ControllerApiServicesV1GroupServiceRemoveGroupMembersBody,
|
||||
ControllerApiServicesV1GroupServiceSetGroupMembersBody,
|
||||
ControllerApiServicesV1ListGroupsResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesGroupsV1GroupFromJSON,
|
||||
ControllerApiResourcesGroupsV1GroupToJSON,
|
||||
ControllerApiServicesV1GroupServiceAddGroupMembersBodyFromJSON,
|
||||
ControllerApiServicesV1GroupServiceAddGroupMembersBodyToJSON,
|
||||
ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyFromJSON,
|
||||
ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyToJSON,
|
||||
ControllerApiServicesV1GroupServiceSetGroupMembersBodyFromJSON,
|
||||
ControllerApiServicesV1GroupServiceSetGroupMembersBodyToJSON,
|
||||
ControllerApiServicesV1ListGroupsResponseFromJSON,
|
||||
ControllerApiServicesV1ListGroupsResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface GroupServiceAddGroupMembersRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1GroupServiceAddGroupMembersBody;
|
||||
}
|
||||
|
||||
export interface GroupServiceCreateGroupRequest {
|
||||
item: Omit<ControllerApiResourcesGroupsV1Group, 'id'|'created_time'|'updated_time'|'member_ids'|'members'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
export interface GroupServiceDeleteGroupRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface GroupServiceGetGroupRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface GroupServiceListGroupsRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface GroupServiceRemoveGroupMembersRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1GroupServiceRemoveGroupMembersBody;
|
||||
}
|
||||
|
||||
export interface GroupServiceSetGroupMembersRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1GroupServiceSetGroupMembersBody;
|
||||
}
|
||||
|
||||
export interface GroupServiceUpdateGroupRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesGroupsV1Group, 'id'|'created_time'|'updated_time'|'member_ids'|'members'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class GroupServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Adds members to a Group.
|
||||
*/
|
||||
async groupServiceAddGroupMembersRaw(requestParameters: GroupServiceAddGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesGroupsV1Group>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling groupServiceAddGroupMembers().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling groupServiceAddGroupMembers().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/groups/{id}:add-members`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1GroupServiceAddGroupMembersBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds members to a Group.
|
||||
*/
|
||||
async groupServiceAddGroupMembers(requestParameters: GroupServiceAddGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesGroupsV1Group> {
|
||||
const response = await this.groupServiceAddGroupMembersRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Group.
|
||||
*/
|
||||
async groupServiceCreateGroupRaw(requestParameters: GroupServiceCreateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesGroupsV1Group>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling groupServiceCreateGroup().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/groups`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesGroupsV1GroupToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Group.
|
||||
*/
|
||||
async groupServiceCreateGroup(requestParameters: GroupServiceCreateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesGroupsV1Group> {
|
||||
const response = await this.groupServiceCreateGroupRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Group.
|
||||
*/
|
||||
async groupServiceDeleteGroupRaw(requestParameters: GroupServiceDeleteGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling groupServiceDeleteGroup().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Group.
|
||||
*/
|
||||
async groupServiceDeleteGroup(requestParameters: GroupServiceDeleteGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.groupServiceDeleteGroupRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Group.
|
||||
*/
|
||||
async groupServiceGetGroupRaw(requestParameters: GroupServiceGetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesGroupsV1Group>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling groupServiceGetGroup().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Group.
|
||||
*/
|
||||
async groupServiceGetGroup(requestParameters: GroupServiceGetGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesGroupsV1Group> {
|
||||
const response = await this.groupServiceGetGroupRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Groups.
|
||||
*/
|
||||
async groupServiceListGroupsRaw(requestParameters: GroupServiceListGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListGroupsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/groups`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListGroupsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Groups.
|
||||
*/
|
||||
async groupServiceListGroups(requestParameters: GroupServiceListGroupsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListGroupsResponse> {
|
||||
const response = await this.groupServiceListGroupsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified members from a Group.
|
||||
*/
|
||||
async groupServiceRemoveGroupMembersRaw(requestParameters: GroupServiceRemoveGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesGroupsV1Group>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling groupServiceRemoveGroupMembers().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling groupServiceRemoveGroupMembers().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/groups/{id}:remove-members`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1GroupServiceRemoveGroupMembersBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified members from a Group.
|
||||
*/
|
||||
async groupServiceRemoveGroupMembers(requestParameters: GroupServiceRemoveGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesGroupsV1Group> {
|
||||
const response = await this.groupServiceRemoveGroupMembersRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a Group\'s members to exactly the list of provided in the request, removing any members that are not specified.
|
||||
*/
|
||||
async groupServiceSetGroupMembersRaw(requestParameters: GroupServiceSetGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesGroupsV1Group>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling groupServiceSetGroupMembers().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling groupServiceSetGroupMembers().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/groups/{id}:set-members`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1GroupServiceSetGroupMembersBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set a Group\'s members to exactly the list of provided in the request, removing any members that are not specified.
|
||||
*/
|
||||
async groupServiceSetGroupMembers(requestParameters: GroupServiceSetGroupMembersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesGroupsV1Group> {
|
||||
const response = await this.groupServiceSetGroupMembersRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Group.
|
||||
*/
|
||||
async groupServiceUpdateGroupRaw(requestParameters: GroupServiceUpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesGroupsV1Group>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling groupServiceUpdateGroup().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling groupServiceUpdateGroup().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesGroupsV1GroupToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesGroupsV1GroupFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Group.
|
||||
*/
|
||||
async groupServiceUpdateGroup(requestParameters: GroupServiceUpdateGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesGroupsV1Group> {
|
||||
const response = await this.groupServiceUpdateGroupRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesHostcatalogsV1HostCatalog,
|
||||
ControllerApiServicesV1ListHostCatalogsResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON,
|
||||
ControllerApiResourcesHostcatalogsV1HostCatalogToJSON,
|
||||
ControllerApiServicesV1ListHostCatalogsResponseFromJSON,
|
||||
ControllerApiServicesV1ListHostCatalogsResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface HostCatalogServiceCreateHostCatalogRequest {
|
||||
item: Omit<ControllerApiResourcesHostcatalogsV1HostCatalog, 'id'|'created_time'|'updated_time'|'secrets_hmac'|'authorized_actions'|'authorized_collection_actions'>;
|
||||
pluginName?: string;
|
||||
}
|
||||
|
||||
export interface HostCatalogServiceDeleteHostCatalogRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface HostCatalogServiceGetHostCatalogRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface HostCatalogServiceListHostCatalogsRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface HostCatalogServiceUpdateHostCatalogRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesHostcatalogsV1HostCatalog, 'id'|'created_time'|'updated_time'|'secrets_hmac'|'authorized_actions'|'authorized_collection_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class HostCatalogServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates a Host Catalog
|
||||
*/
|
||||
async hostCatalogServiceCreateHostCatalogRaw(requestParameters: HostCatalogServiceCreateHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostcatalogsV1HostCatalog>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling hostCatalogServiceCreateHostCatalog().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['pluginName'] != null) {
|
||||
queryParameters['plugin_name'] = requestParameters['pluginName'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-catalogs`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesHostcatalogsV1HostCatalogToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Host Catalog
|
||||
*/
|
||||
async hostCatalogServiceCreateHostCatalog(requestParameters: HostCatalogServiceCreateHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostcatalogsV1HostCatalog> {
|
||||
const response = await this.hostCatalogServiceCreateHostCatalogRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Host Catalog
|
||||
*/
|
||||
async hostCatalogServiceDeleteHostCatalogRaw(requestParameters: HostCatalogServiceDeleteHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostCatalogServiceDeleteHostCatalog().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-catalogs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Host Catalog
|
||||
*/
|
||||
async hostCatalogServiceDeleteHostCatalog(requestParameters: HostCatalogServiceDeleteHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.hostCatalogServiceDeleteHostCatalogRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Host Catalog.
|
||||
*/
|
||||
async hostCatalogServiceGetHostCatalogRaw(requestParameters: HostCatalogServiceGetHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostcatalogsV1HostCatalog>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostCatalogServiceGetHostCatalog().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-catalogs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Host Catalog.
|
||||
*/
|
||||
async hostCatalogServiceGetHostCatalog(requestParameters: HostCatalogServiceGetHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostcatalogsV1HostCatalog> {
|
||||
const response = await this.hostCatalogServiceGetHostCatalogRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of Host Catalogs.
|
||||
*/
|
||||
async hostCatalogServiceListHostCatalogsRaw(requestParameters: HostCatalogServiceListHostCatalogsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListHostCatalogsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-catalogs`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListHostCatalogsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of Host Catalogs.
|
||||
*/
|
||||
async hostCatalogServiceListHostCatalogs(requestParameters: HostCatalogServiceListHostCatalogsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListHostCatalogsResponse> {
|
||||
const response = await this.hostCatalogServiceListHostCatalogsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Host Catalog
|
||||
*/
|
||||
async hostCatalogServiceUpdateHostCatalogRaw(requestParameters: HostCatalogServiceUpdateHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostcatalogsV1HostCatalog>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostCatalogServiceUpdateHostCatalog().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling hostCatalogServiceUpdateHostCatalog().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-catalogs/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesHostcatalogsV1HostCatalogToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Host Catalog
|
||||
*/
|
||||
async hostCatalogServiceUpdateHostCatalog(requestParameters: HostCatalogServiceUpdateHostCatalogRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostcatalogsV1HostCatalog> {
|
||||
const response = await this.hostCatalogServiceUpdateHostCatalogRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesHostsV1Host,
|
||||
ControllerApiServicesV1ListHostsResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesHostsV1HostFromJSON,
|
||||
ControllerApiResourcesHostsV1HostToJSON,
|
||||
ControllerApiServicesV1ListHostsResponseFromJSON,
|
||||
ControllerApiServicesV1ListHostsResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface HostServiceCreateHostRequest {
|
||||
item: Omit<ControllerApiResourcesHostsV1Host, 'id'|'created_time'|'updated_time'|'host_set_ids'|'ip_addresses'|'dns_names'|'external_id'|'external_name'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
export interface HostServiceDeleteHostRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface HostServiceGetHostRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface HostServiceListHostsRequest {
|
||||
hostCatalogId?: string;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface HostServiceUpdateHostRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesHostsV1Host, 'id'|'created_time'|'updated_time'|'host_set_ids'|'ip_addresses'|'dns_names'|'external_id'|'external_name'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class HostServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Create a single Host.
|
||||
*/
|
||||
async hostServiceCreateHostRaw(requestParameters: HostServiceCreateHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostsV1Host>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling hostServiceCreateHost().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/hosts`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesHostsV1HostToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsV1HostFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a single Host.
|
||||
*/
|
||||
async hostServiceCreateHost(requestParameters: HostServiceCreateHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostsV1Host> {
|
||||
const response = await this.hostServiceCreateHostRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a Host.
|
||||
*/
|
||||
async hostServiceDeleteHostRaw(requestParameters: HostServiceDeleteHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostServiceDeleteHost().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/hosts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a Host.
|
||||
*/
|
||||
async hostServiceDeleteHost(requestParameters: HostServiceDeleteHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.hostServiceDeleteHostRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Host.
|
||||
*/
|
||||
async hostServiceGetHostRaw(requestParameters: HostServiceGetHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostsV1Host>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostServiceGetHost().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/hosts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsV1HostFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Host.
|
||||
*/
|
||||
async hostServiceGetHost(requestParameters: HostServiceGetHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostsV1Host> {
|
||||
const response = await this.hostServiceGetHostRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* List all Hosts for the specified Catalog.
|
||||
*/
|
||||
async hostServiceListHostsRaw(requestParameters: HostServiceListHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListHostsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['hostCatalogId'] != null) {
|
||||
queryParameters['host_catalog_id'] = requestParameters['hostCatalogId'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/hosts`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListHostsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* List all Hosts for the specified Catalog.
|
||||
*/
|
||||
async hostServiceListHosts(requestParameters: HostServiceListHostsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListHostsResponse> {
|
||||
const response = await this.hostServiceListHostsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a Host.
|
||||
*/
|
||||
async hostServiceUpdateHostRaw(requestParameters: HostServiceUpdateHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostsV1Host>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostServiceUpdateHost().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling hostServiceUpdateHost().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/hosts/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesHostsV1HostToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsV1HostFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a Host.
|
||||
*/
|
||||
async hostServiceUpdateHost(requestParameters: HostServiceUpdateHostRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostsV1Host> {
|
||||
const response = await this.hostServiceUpdateHostRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,432 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesHostsetsV1HostSet,
|
||||
ControllerApiServicesV1HostSetServiceAddHostSetHostsBody,
|
||||
ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody,
|
||||
ControllerApiServicesV1HostSetServiceSetHostSetHostsBody,
|
||||
ControllerApiServicesV1ListHostSetsResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesHostsetsV1HostSetFromJSON,
|
||||
ControllerApiResourcesHostsetsV1HostSetToJSON,
|
||||
ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyFromJSON,
|
||||
ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyToJSON,
|
||||
ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyFromJSON,
|
||||
ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyToJSON,
|
||||
ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyFromJSON,
|
||||
ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyToJSON,
|
||||
ControllerApiServicesV1ListHostSetsResponseFromJSON,
|
||||
ControllerApiServicesV1ListHostSetsResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface HostSetServiceAddHostSetHostsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1HostSetServiceAddHostSetHostsBody;
|
||||
}
|
||||
|
||||
export interface HostSetServiceCreateHostSetRequest {
|
||||
item: Omit<ControllerApiResourcesHostsetsV1HostSet, 'id'|'created_time'|'updated_time'|'host_ids'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
export interface HostSetServiceDeleteHostSetRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface HostSetServiceGetHostSetRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface HostSetServiceListHostSetsRequest {
|
||||
hostCatalogId?: string;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface HostSetServiceRemoveHostSetHostsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBody;
|
||||
}
|
||||
|
||||
export interface HostSetServiceSetHostSetHostsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1HostSetServiceSetHostSetHostsBody;
|
||||
}
|
||||
|
||||
export interface HostSetServiceUpdateHostSetRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesHostsetsV1HostSet, 'id'|'created_time'|'updated_time'|'host_ids'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class HostSetServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Adds existing Hosts to a Host Set.
|
||||
*/
|
||||
async hostSetServiceAddHostSetHostsRaw(requestParameters: HostSetServiceAddHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostsetsV1HostSet>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostSetServiceAddHostSetHosts().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling hostSetServiceAddHostSetHosts().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-sets/{id}:add-hosts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1HostSetServiceAddHostSetHostsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds existing Hosts to a Host Set.
|
||||
*/
|
||||
async hostSetServiceAddHostSetHosts(requestParameters: HostSetServiceAddHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostsetsV1HostSet> {
|
||||
const response = await this.hostSetServiceAddHostSetHostsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Host Set.
|
||||
*/
|
||||
async hostSetServiceCreateHostSetRaw(requestParameters: HostSetServiceCreateHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostsetsV1HostSet>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling hostSetServiceCreateHostSet().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-sets`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesHostsetsV1HostSetToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a Host Set.
|
||||
*/
|
||||
async hostSetServiceCreateHostSet(requestParameters: HostSetServiceCreateHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostsetsV1HostSet> {
|
||||
const response = await this.hostSetServiceCreateHostSetRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a Host Set.
|
||||
*/
|
||||
async hostSetServiceDeleteHostSetRaw(requestParameters: HostSetServiceDeleteHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostSetServiceDeleteHostSet().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-sets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a Host Set.
|
||||
*/
|
||||
async hostSetServiceDeleteHostSet(requestParameters: HostSetServiceDeleteHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.hostSetServiceDeleteHostSetRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a single Host Set.
|
||||
*/
|
||||
async hostSetServiceGetHostSetRaw(requestParameters: HostSetServiceGetHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostsetsV1HostSet>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostSetServiceGetHostSet().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-sets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a single Host Set.
|
||||
*/
|
||||
async hostSetServiceGetHostSet(requestParameters: HostSetServiceGetHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostsetsV1HostSet> {
|
||||
const response = await this.hostSetServiceGetHostSetRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* List all Host Sets under the specific Catalog.
|
||||
*/
|
||||
async hostSetServiceListHostSetsRaw(requestParameters: HostSetServiceListHostSetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListHostSetsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['hostCatalogId'] != null) {
|
||||
queryParameters['host_catalog_id'] = requestParameters['hostCatalogId'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-sets`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListHostSetsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* List all Host Sets under the specific Catalog.
|
||||
*/
|
||||
async hostSetServiceListHostSets(requestParameters: HostSetServiceListHostSetsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListHostSetsResponse> {
|
||||
const response = await this.hostSetServiceListHostSetsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes Hosts from the Host Set.
|
||||
*/
|
||||
async hostSetServiceRemoveHostSetHostsRaw(requestParameters: HostSetServiceRemoveHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostsetsV1HostSet>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostSetServiceRemoveHostSetHosts().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling hostSetServiceRemoveHostSetHosts().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-sets/{id}:remove-hosts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1HostSetServiceRemoveHostSetHostsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes Hosts from the Host Set.
|
||||
*/
|
||||
async hostSetServiceRemoveHostSetHosts(requestParameters: HostSetServiceRemoveHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostsetsV1HostSet> {
|
||||
const response = await this.hostSetServiceRemoveHostSetHostsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Hosts on the Host Set.
|
||||
*/
|
||||
async hostSetServiceSetHostSetHostsRaw(requestParameters: HostSetServiceSetHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostsetsV1HostSet>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostSetServiceSetHostSetHosts().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling hostSetServiceSetHostSetHosts().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-sets/{id}:set-hosts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1HostSetServiceSetHostSetHostsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Hosts on the Host Set.
|
||||
*/
|
||||
async hostSetServiceSetHostSetHosts(requestParameters: HostSetServiceSetHostSetHostsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostsetsV1HostSet> {
|
||||
const response = await this.hostSetServiceSetHostSetHostsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a Host Set.
|
||||
*/
|
||||
async hostSetServiceUpdateHostSetRaw(requestParameters: HostSetServiceUpdateHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesHostsetsV1HostSet>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling hostSetServiceUpdateHostSet().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling hostSetServiceUpdateHostSet().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/host-sets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesHostsetsV1HostSetToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesHostsetsV1HostSetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Update a Host Set.
|
||||
*/
|
||||
async hostSetServiceUpdateHostSet(requestParameters: HostSetServiceUpdateHostSetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesHostsetsV1HostSet> {
|
||||
const response = await this.hostSetServiceUpdateHostSetRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,267 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesManagedgroupsV1ManagedGroup,
|
||||
ControllerApiServicesV1ListManagedGroupsResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON,
|
||||
ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON,
|
||||
ControllerApiServicesV1ListManagedGroupsResponseFromJSON,
|
||||
ControllerApiServicesV1ListManagedGroupsResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface ManagedGroupServiceCreateManagedGroupRequest {
|
||||
item: Omit<ControllerApiResourcesManagedgroupsV1ManagedGroup, 'id'|'created_time'|'updated_time'|'member_ids'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
export interface ManagedGroupServiceDeleteManagedGroupRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface ManagedGroupServiceGetManagedGroupRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface ManagedGroupServiceListManagedGroupsRequest {
|
||||
authMethodId?: string;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface ManagedGroupServiceUpdateManagedGroupRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesManagedgroupsV1ManagedGroup, 'id'|'created_time'|'updated_time'|'member_ids'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class ManagedGroupServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates a single ManagedGroup in the provided Auth Method.
|
||||
*/
|
||||
async managedGroupServiceCreateManagedGroupRaw(requestParameters: ManagedGroupServiceCreateManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesManagedgroupsV1ManagedGroup>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling managedGroupServiceCreateManagedGroup().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/managed-groups`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single ManagedGroup in the provided Auth Method.
|
||||
*/
|
||||
async managedGroupServiceCreateManagedGroup(requestParameters: ManagedGroupServiceCreateManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesManagedgroupsV1ManagedGroup> {
|
||||
const response = await this.managedGroupServiceCreateManagedGroupRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a ManagedGroup.
|
||||
*/
|
||||
async managedGroupServiceDeleteManagedGroupRaw(requestParameters: ManagedGroupServiceDeleteManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling managedGroupServiceDeleteManagedGroup().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/managed-groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a ManagedGroup.
|
||||
*/
|
||||
async managedGroupServiceDeleteManagedGroup(requestParameters: ManagedGroupServiceDeleteManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.managedGroupServiceDeleteManagedGroupRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single ManagedGroup.
|
||||
*/
|
||||
async managedGroupServiceGetManagedGroupRaw(requestParameters: ManagedGroupServiceGetManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesManagedgroupsV1ManagedGroup>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling managedGroupServiceGetManagedGroup().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/managed-groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single ManagedGroup.
|
||||
*/
|
||||
async managedGroupServiceGetManagedGroup(requestParameters: ManagedGroupServiceGetManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesManagedgroupsV1ManagedGroup> {
|
||||
const response = await this.managedGroupServiceGetManagedGroupRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all ManagedGroups in a specific Auth Method.
|
||||
*/
|
||||
async managedGroupServiceListManagedGroupsRaw(requestParameters: ManagedGroupServiceListManagedGroupsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListManagedGroupsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['authMethodId'] != null) {
|
||||
queryParameters['auth_method_id'] = requestParameters['authMethodId'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/managed-groups`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListManagedGroupsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all ManagedGroups in a specific Auth Method.
|
||||
*/
|
||||
async managedGroupServiceListManagedGroups(requestParameters: ManagedGroupServiceListManagedGroupsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListManagedGroupsResponse> {
|
||||
const response = await this.managedGroupServiceListManagedGroupsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a ManagedGroup.
|
||||
*/
|
||||
async managedGroupServiceUpdateManagedGroupRaw(requestParameters: ManagedGroupServiceUpdateManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesManagedgroupsV1ManagedGroup>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling managedGroupServiceUpdateManagedGroup().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling managedGroupServiceUpdateManagedGroup().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/managed-groups/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a ManagedGroup.
|
||||
*/
|
||||
async managedGroupServiceUpdateManagedGroup(requestParameters: ManagedGroupServiceUpdateManagedGroupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesManagedgroupsV1ManagedGroup> {
|
||||
const response = await this.managedGroupServiceUpdateManagedGroupRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,272 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesPoliciesV1Policy,
|
||||
ControllerApiServicesV1ListPoliciesResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesPoliciesV1PolicyFromJSON,
|
||||
ControllerApiResourcesPoliciesV1PolicyToJSON,
|
||||
ControllerApiServicesV1ListPoliciesResponseFromJSON,
|
||||
ControllerApiServicesV1ListPoliciesResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface PolicyServiceCreatePolicyRequest {
|
||||
item: Omit<ControllerApiResourcesPoliciesV1Policy, 'id'|'created_time'|'updated_time'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
export interface PolicyServiceDeletePolicyRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface PolicyServiceGetPolicyRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface PolicyServiceListPoliciesRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface PolicyServiceUpdatePolicyRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesPoliciesV1Policy, 'id'|'created_time'|'updated_time'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class PolicyServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates a single policy.
|
||||
*/
|
||||
async policyServiceCreatePolicyRaw(requestParameters: PolicyServiceCreatePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesPoliciesV1Policy>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling policyServiceCreatePolicy().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/policies`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesPoliciesV1PolicyToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesPoliciesV1PolicyFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single policy.
|
||||
*/
|
||||
async policyServiceCreatePolicy(requestParameters: PolicyServiceCreatePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesPoliciesV1Policy> {
|
||||
const response = await this.policyServiceCreatePolicyRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing policy.
|
||||
*/
|
||||
async policyServiceDeletePolicyRaw(requestParameters: PolicyServiceDeletePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling policyServiceDeletePolicy().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/policies/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes an existing policy.
|
||||
*/
|
||||
async policyServiceDeletePolicy(requestParameters: PolicyServiceDeletePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.policyServiceDeletePolicyRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single policy with the given id.
|
||||
*/
|
||||
async policyServiceGetPolicyRaw(requestParameters: PolicyServiceGetPolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesPoliciesV1Policy>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling policyServiceGetPolicy().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/policies/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesPoliciesV1PolicyFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single policy with the given id.
|
||||
*/
|
||||
async policyServiceGetPolicy(requestParameters: PolicyServiceGetPolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesPoliciesV1Policy> {
|
||||
const response = await this.policyServiceGetPolicyRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all policies.
|
||||
*/
|
||||
async policyServiceListPoliciesRaw(requestParameters: PolicyServiceListPoliciesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListPoliciesResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/policies`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListPoliciesResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all policies.
|
||||
*/
|
||||
async policyServiceListPolicies(requestParameters: PolicyServiceListPoliciesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListPoliciesResponse> {
|
||||
const response = await this.policyServiceListPoliciesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an existing policy.
|
||||
*/
|
||||
async policyServiceUpdatePolicyRaw(requestParameters: PolicyServiceUpdatePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesPoliciesV1Policy>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling policyServiceUpdatePolicy().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling policyServiceUpdatePolicy().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/policies/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesPoliciesV1PolicyToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesPoliciesV1PolicyFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates an existing policy.
|
||||
*/
|
||||
async policyServiceUpdatePolicy(requestParameters: PolicyServiceUpdatePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesPoliciesV1Policy> {
|
||||
const response = await this.policyServiceUpdatePolicyRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,767 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesRolesV1Role,
|
||||
ControllerApiServicesV1ListRolesResponse,
|
||||
ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody,
|
||||
ControllerApiServicesV1RoleServiceAddRoleGrantsBody,
|
||||
ControllerApiServicesV1RoleServiceAddRolePrincipalsBody,
|
||||
ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody,
|
||||
ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody,
|
||||
ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody,
|
||||
ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody,
|
||||
ControllerApiServicesV1RoleServiceSetRoleGrantsBody,
|
||||
ControllerApiServicesV1RoleServiceSetRolePrincipalsBody,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesRolesV1RoleFromJSON,
|
||||
ControllerApiResourcesRolesV1RoleToJSON,
|
||||
ControllerApiServicesV1ListRolesResponseFromJSON,
|
||||
ControllerApiServicesV1ListRolesResponseToJSON,
|
||||
ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyFromJSON,
|
||||
ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyToJSON,
|
||||
ControllerApiServicesV1RoleServiceAddRoleGrantsBodyFromJSON,
|
||||
ControllerApiServicesV1RoleServiceAddRoleGrantsBodyToJSON,
|
||||
ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyFromJSON,
|
||||
ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyToJSON,
|
||||
ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyFromJSON,
|
||||
ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyToJSON,
|
||||
ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyFromJSON,
|
||||
ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyToJSON,
|
||||
ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyFromJSON,
|
||||
ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyToJSON,
|
||||
ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyFromJSON,
|
||||
ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyToJSON,
|
||||
ControllerApiServicesV1RoleServiceSetRoleGrantsBodyFromJSON,
|
||||
ControllerApiServicesV1RoleServiceSetRoleGrantsBodyToJSON,
|
||||
ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyFromJSON,
|
||||
ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface RoleServiceAddRoleGrantScopesRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1RoleServiceAddRoleGrantScopesBody;
|
||||
}
|
||||
|
||||
export interface RoleServiceAddRoleGrantsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1RoleServiceAddRoleGrantsBody;
|
||||
}
|
||||
|
||||
export interface RoleServiceAddRolePrincipalsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1RoleServiceAddRolePrincipalsBody;
|
||||
}
|
||||
|
||||
export interface RoleServiceCreateRoleRequest {
|
||||
item: Omit<ControllerApiResourcesRolesV1Role, 'id'|'created_time'|'updated_time'|'grant_scope_ids'|'principal_ids'|'principals'|'grant_strings'|'grants'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
export interface RoleServiceDeleteRoleRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface RoleServiceGetRoleRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface RoleServiceListRolesRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface RoleServiceRemoveRoleGrantScopesRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBody;
|
||||
}
|
||||
|
||||
export interface RoleServiceRemoveRoleGrantsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1RoleServiceRemoveRoleGrantsBody;
|
||||
}
|
||||
|
||||
export interface RoleServiceRemoveRolePrincipalsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBody;
|
||||
}
|
||||
|
||||
export interface RoleServiceSetRoleGrantScopesRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1RoleServiceSetRoleGrantScopesBody;
|
||||
}
|
||||
|
||||
export interface RoleServiceSetRoleGrantsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1RoleServiceSetRoleGrantsBody;
|
||||
}
|
||||
|
||||
export interface RoleServiceSetRolePrincipalsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1RoleServiceSetRolePrincipalsBody;
|
||||
}
|
||||
|
||||
export interface RoleServiceUpdateRoleRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesRolesV1Role, 'id'|'created_time'|'updated_time'|'grant_scope_ids'|'principal_ids'|'principals'|'grant_strings'|'grants'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class RoleServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Adds grant scopes to a Role
|
||||
*/
|
||||
async roleServiceAddRoleGrantScopesRaw(requestParameters: RoleServiceAddRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceAddRoleGrantScopes().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling roleServiceAddRoleGrantScopes().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}:add-grant-scopes`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1RoleServiceAddRoleGrantScopesBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds grant scopes to a Role
|
||||
*/
|
||||
async roleServiceAddRoleGrantScopes(requestParameters: RoleServiceAddRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceAddRoleGrantScopesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds grants to a Role
|
||||
*/
|
||||
async roleServiceAddRoleGrantsRaw(requestParameters: RoleServiceAddRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceAddRoleGrants().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling roleServiceAddRoleGrants().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}:add-grants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1RoleServiceAddRoleGrantsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds grants to a Role
|
||||
*/
|
||||
async roleServiceAddRoleGrants(requestParameters: RoleServiceAddRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceAddRoleGrantsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds Users and/or Groups to a Role.
|
||||
*/
|
||||
async roleServiceAddRolePrincipalsRaw(requestParameters: RoleServiceAddRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceAddRolePrincipals().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling roleServiceAddRolePrincipals().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}:add-principals`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1RoleServiceAddRolePrincipalsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds Users and/or Groups to a Role.
|
||||
*/
|
||||
async roleServiceAddRolePrincipals(requestParameters: RoleServiceAddRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceAddRolePrincipalsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Role.
|
||||
*/
|
||||
async roleServiceCreateRoleRaw(requestParameters: RoleServiceCreateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling roleServiceCreateRole().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesRolesV1RoleToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Role.
|
||||
*/
|
||||
async roleServiceCreateRole(requestParameters: RoleServiceCreateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceCreateRoleRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Role.
|
||||
*/
|
||||
async roleServiceDeleteRoleRaw(requestParameters: RoleServiceDeleteRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceDeleteRole().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Role.
|
||||
*/
|
||||
async roleServiceDeleteRole(requestParameters: RoleServiceDeleteRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.roleServiceDeleteRoleRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Role.
|
||||
*/
|
||||
async roleServiceGetRoleRaw(requestParameters: RoleServiceGetRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceGetRole().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Role.
|
||||
*/
|
||||
async roleServiceGetRole(requestParameters: RoleServiceGetRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceGetRoleRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Roles.
|
||||
*/
|
||||
async roleServiceListRolesRaw(requestParameters: RoleServiceListRolesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListRolesResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListRolesResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Roles.
|
||||
*/
|
||||
async roleServiceListRoles(requestParameters: RoleServiceListRolesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListRolesResponse> {
|
||||
const response = await this.roleServiceListRolesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes grant scopes from a Role.
|
||||
*/
|
||||
async roleServiceRemoveRoleGrantScopesRaw(requestParameters: RoleServiceRemoveRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceRemoveRoleGrantScopes().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling roleServiceRemoveRoleGrantScopes().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}:remove-grant-scopes`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1RoleServiceRemoveRoleGrantScopesBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes grant scopes from a Role.
|
||||
*/
|
||||
async roleServiceRemoveRoleGrantScopes(requestParameters: RoleServiceRemoveRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceRemoveRoleGrantScopesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes grants from a Role.
|
||||
*/
|
||||
async roleServiceRemoveRoleGrantsRaw(requestParameters: RoleServiceRemoveRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceRemoveRoleGrants().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling roleServiceRemoveRoleGrants().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}:remove-grants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1RoleServiceRemoveRoleGrantsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes grants from a Role.
|
||||
*/
|
||||
async roleServiceRemoveRoleGrants(requestParameters: RoleServiceRemoveRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceRemoveRoleGrantsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified Users and/or Groups from a Role.
|
||||
*/
|
||||
async roleServiceRemoveRolePrincipalsRaw(requestParameters: RoleServiceRemoveRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceRemoveRolePrincipals().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling roleServiceRemoveRolePrincipals().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}:remove-principals`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1RoleServiceRemoveRolePrincipalsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified Users and/or Groups from a Role.
|
||||
*/
|
||||
async roleServiceRemoveRolePrincipals(requestParameters: RoleServiceRemoveRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceRemoveRolePrincipalsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set grant scopes for a Role, removing any grant scopes that are not specified in the request.
|
||||
*/
|
||||
async roleServiceSetRoleGrantScopesRaw(requestParameters: RoleServiceSetRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceSetRoleGrantScopes().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling roleServiceSetRoleGrantScopes().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}:set-grant-scopes`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1RoleServiceSetRoleGrantScopesBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set grant scopes for a Role, removing any grant scopes that are not specified in the request.
|
||||
*/
|
||||
async roleServiceSetRoleGrantScopes(requestParameters: RoleServiceSetRoleGrantScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceSetRoleGrantScopesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set grants for a Role, removing any grants that are not specified in the request.
|
||||
*/
|
||||
async roleServiceSetRoleGrantsRaw(requestParameters: RoleServiceSetRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceSetRoleGrants().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling roleServiceSetRoleGrants().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}:set-grants`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1RoleServiceSetRoleGrantsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set grants for a Role, removing any grants that are not specified in the request.
|
||||
*/
|
||||
async roleServiceSetRoleGrants(requestParameters: RoleServiceSetRoleGrantsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceSetRoleGrantsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Users and/or Groups to a Role, removing any principals that are not specified in the request.
|
||||
*/
|
||||
async roleServiceSetRolePrincipalsRaw(requestParameters: RoleServiceSetRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceSetRolePrincipals().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling roleServiceSetRolePrincipals().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}:set-principals`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1RoleServiceSetRolePrincipalsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set Users and/or Groups to a Role, removing any principals that are not specified in the request.
|
||||
*/
|
||||
async roleServiceSetRolePrincipals(requestParameters: RoleServiceSetRolePrincipalsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceSetRolePrincipalsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Role.
|
||||
*/
|
||||
async roleServiceUpdateRoleRaw(requestParameters: RoleServiceUpdateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesRolesV1Role>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling roleServiceUpdateRole().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling roleServiceUpdateRole().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/roles/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesRolesV1RoleToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesRolesV1RoleFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Role.
|
||||
*/
|
||||
async roleServiceUpdateRole(requestParameters: RoleServiceUpdateRoleRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesRolesV1Role> {
|
||||
const response = await this.roleServiceUpdateRoleRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,577 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesScopesV1Scope,
|
||||
ControllerApiServicesV1DestroyKeyVersionRequest,
|
||||
ControllerApiServicesV1DestroyKeyVersionResponse,
|
||||
ControllerApiServicesV1ListKeyVersionDestructionJobsResponse,
|
||||
ControllerApiServicesV1ListKeysResponse,
|
||||
ControllerApiServicesV1ListScopesResponse,
|
||||
ControllerApiServicesV1RotateKeysRequest,
|
||||
ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody,
|
||||
ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeToJSON,
|
||||
ControllerApiServicesV1DestroyKeyVersionRequestFromJSON,
|
||||
ControllerApiServicesV1DestroyKeyVersionRequestToJSON,
|
||||
ControllerApiServicesV1DestroyKeyVersionResponseFromJSON,
|
||||
ControllerApiServicesV1DestroyKeyVersionResponseToJSON,
|
||||
ControllerApiServicesV1ListKeyVersionDestructionJobsResponseFromJSON,
|
||||
ControllerApiServicesV1ListKeyVersionDestructionJobsResponseToJSON,
|
||||
ControllerApiServicesV1ListKeysResponseFromJSON,
|
||||
ControllerApiServicesV1ListKeysResponseToJSON,
|
||||
ControllerApiServicesV1ListScopesResponseFromJSON,
|
||||
ControllerApiServicesV1ListScopesResponseToJSON,
|
||||
ControllerApiServicesV1RotateKeysRequestFromJSON,
|
||||
ControllerApiServicesV1RotateKeysRequestToJSON,
|
||||
ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyFromJSON,
|
||||
ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyToJSON,
|
||||
ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyFromJSON,
|
||||
ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface ScopeServiceAttachStoragePolicyRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1ScopeServiceAttachStoragePolicyBody;
|
||||
}
|
||||
|
||||
export interface ScopeServiceCreateScopeRequest {
|
||||
item: Omit<ControllerApiResourcesScopesV1Scope, 'id'|'created_time'|'updated_time'|'authorized_actions'|'authorized_collection_actions'|'storage_policy_id'>;
|
||||
skipAdminRoleCreation?: boolean;
|
||||
skipDefaultRoleCreation?: boolean;
|
||||
}
|
||||
|
||||
export interface ScopeServiceDeleteScopeRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface ScopeServiceDestroyKeyVersionRequest {
|
||||
body: ControllerApiServicesV1DestroyKeyVersionRequest;
|
||||
}
|
||||
|
||||
export interface ScopeServiceDetachStoragePolicyRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1ScopeServiceDetachStoragePolicyBody;
|
||||
}
|
||||
|
||||
export interface ScopeServiceGetScopeRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface ScopeServiceListKeyVersionDestructionJobsRequest {
|
||||
scopeId: string;
|
||||
}
|
||||
|
||||
export interface ScopeServiceListKeysRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface ScopeServiceListScopesRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface ScopeServiceRotateKeysRequest {
|
||||
body: ControllerApiServicesV1RotateKeysRequest;
|
||||
}
|
||||
|
||||
export interface ScopeServiceUpdateScopeRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesScopesV1Scope, 'id'|'created_time'|'updated_time'|'authorized_actions'|'authorized_collection_actions'|'storage_policy_id'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class ScopeServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Attaches the specified Storage Policy to the Scope.
|
||||
*/
|
||||
async scopeServiceAttachStoragePolicyRaw(requestParameters: ScopeServiceAttachStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesScopesV1Scope>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling scopeServiceAttachStoragePolicy().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling scopeServiceAttachStoragePolicy().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes/{id}:attach-storage-policy`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1ScopeServiceAttachStoragePolicyBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesScopesV1ScopeFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Attaches the specified Storage Policy to the Scope.
|
||||
*/
|
||||
async scopeServiceAttachStoragePolicy(requestParameters: ScopeServiceAttachStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesScopesV1Scope> {
|
||||
const response = await this.scopeServiceAttachStoragePolicyRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Scope.
|
||||
*/
|
||||
async scopeServiceCreateScopeRaw(requestParameters: ScopeServiceCreateScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesScopesV1Scope>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling scopeServiceCreateScope().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['skipAdminRoleCreation'] != null) {
|
||||
queryParameters['skip_admin_role_creation'] = requestParameters['skipAdminRoleCreation'];
|
||||
}
|
||||
|
||||
if (requestParameters['skipDefaultRoleCreation'] != null) {
|
||||
queryParameters['skip_default_role_creation'] = requestParameters['skipDefaultRoleCreation'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesScopesV1ScopeToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesScopesV1ScopeFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Scope.
|
||||
*/
|
||||
async scopeServiceCreateScope(requestParameters: ScopeServiceCreateScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesScopesV1Scope> {
|
||||
const response = await this.scopeServiceCreateScopeRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Scope.
|
||||
*/
|
||||
async scopeServiceDeleteScopeRaw(requestParameters: ScopeServiceDeleteScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling scopeServiceDeleteScope().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Scope.
|
||||
*/
|
||||
async scopeServiceDeleteScope(requestParameters: ScopeServiceDeleteScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.scopeServiceDeleteScopeRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy the specified key version in a Scope. This may start an asynchronous job that re-encrypts all data encrypted by the specified key version. Use GET /v1/scopes/{scope_id}:list-key-version-destruction-jobs to monitor pending destruction jobs.
|
||||
*/
|
||||
async scopeServiceDestroyKeyVersionRaw(requestParameters: ScopeServiceDestroyKeyVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1DestroyKeyVersionResponse>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling scopeServiceDestroyKeyVersion().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes:destroy-key-version`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1DestroyKeyVersionRequestToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1DestroyKeyVersionResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Destroy the specified key version in a Scope. This may start an asynchronous job that re-encrypts all data encrypted by the specified key version. Use GET /v1/scopes/{scope_id}:list-key-version-destruction-jobs to monitor pending destruction jobs.
|
||||
*/
|
||||
async scopeServiceDestroyKeyVersion(requestParameters: ScopeServiceDestroyKeyVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1DestroyKeyVersionResponse> {
|
||||
const response = await this.scopeServiceDestroyKeyVersionRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Detaches the specified Storage Policy from the Scope.
|
||||
*/
|
||||
async scopeServiceDetachStoragePolicyRaw(requestParameters: ScopeServiceDetachStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesScopesV1Scope>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling scopeServiceDetachStoragePolicy().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling scopeServiceDetachStoragePolicy().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes/{id}:detach-storage-policy`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1ScopeServiceDetachStoragePolicyBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesScopesV1ScopeFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Detaches the specified Storage Policy from the Scope.
|
||||
*/
|
||||
async scopeServiceDetachStoragePolicy(requestParameters: ScopeServiceDetachStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesScopesV1Scope> {
|
||||
const response = await this.scopeServiceDetachStoragePolicyRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Scope.
|
||||
*/
|
||||
async scopeServiceGetScopeRaw(requestParameters: ScopeServiceGetScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesScopesV1Scope>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling scopeServiceGetScope().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesScopesV1ScopeFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Scope.
|
||||
*/
|
||||
async scopeServiceGetScope(requestParameters: ScopeServiceGetScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesScopesV1Scope> {
|
||||
const response = await this.scopeServiceGetScopeRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all pending key version destruction jobs in a Scope.
|
||||
*/
|
||||
async scopeServiceListKeyVersionDestructionJobsRaw(requestParameters: ScopeServiceListKeyVersionDestructionJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListKeyVersionDestructionJobsResponse>> {
|
||||
if (requestParameters['scopeId'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'scopeId',
|
||||
'Required parameter "scopeId" was null or undefined when calling scopeServiceListKeyVersionDestructionJobs().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes/{scope_id}:list-key-version-destruction-jobs`.replace(`{${"scope_id"}}`, encodeURIComponent(String(requestParameters['scopeId']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListKeyVersionDestructionJobsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all pending key version destruction jobs in a Scope.
|
||||
*/
|
||||
async scopeServiceListKeyVersionDestructionJobs(requestParameters: ScopeServiceListKeyVersionDestructionJobsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListKeyVersionDestructionJobsResponse> {
|
||||
const response = await this.scopeServiceListKeyVersionDestructionJobsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* List all keys in a Scope.
|
||||
*/
|
||||
async scopeServiceListKeysRaw(requestParameters: ScopeServiceListKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListKeysResponse>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling scopeServiceListKeys().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes/{id}:list-keys`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListKeysResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* List all keys in a Scope.
|
||||
*/
|
||||
async scopeServiceListKeys(requestParameters: ScopeServiceListKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListKeysResponse> {
|
||||
const response = await this.scopeServiceListKeysRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Scopes within the Scope provided in the request.
|
||||
*/
|
||||
async scopeServiceListScopesRaw(requestParameters: ScopeServiceListScopesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListScopesResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListScopesResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Scopes within the Scope provided in the request.
|
||||
*/
|
||||
async scopeServiceListScopes(requestParameters: ScopeServiceListScopesRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListScopesResponse> {
|
||||
const response = await this.scopeServiceListScopesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate all keys in a Scope.
|
||||
*/
|
||||
async scopeServiceRotateKeysRaw(requestParameters: ScopeServiceRotateKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling scopeServiceRotateKeys().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes:rotate-keys`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1RotateKeysRequestToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Rotate all keys in a Scope.
|
||||
*/
|
||||
async scopeServiceRotateKeys(requestParameters: ScopeServiceRotateKeysRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.scopeServiceRotateKeysRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Scope.
|
||||
*/
|
||||
async scopeServiceUpdateScopeRaw(requestParameters: ScopeServiceUpdateScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesScopesV1Scope>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling scopeServiceUpdateScope().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling scopeServiceUpdateScope().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/scopes/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesScopesV1ScopeToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesScopesV1ScopeFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Scope.
|
||||
*/
|
||||
async scopeServiceUpdateScope(requestParameters: ScopeServiceUpdateScopeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesScopesV1Scope> {
|
||||
const response = await this.scopeServiceUpdateScopeRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,258 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesSessionrecordingsV1SessionRecording,
|
||||
ControllerApiServicesV1ListSessionRecordingsResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSON,
|
||||
ControllerApiServicesV1ListSessionRecordingsResponseFromJSON,
|
||||
ControllerApiServicesV1ListSessionRecordingsResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface SessionRecordingServiceDeleteSessionRecordingRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface SessionRecordingServiceDownloadRequest {
|
||||
id: string;
|
||||
mimeType?: string;
|
||||
}
|
||||
|
||||
export interface SessionRecordingServiceGetSessionRecordingRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface SessionRecordingServiceListSessionRecordingsRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface SessionRecordingServiceReApplyStoragePolicyRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class SessionRecordingServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Deletes a Session Recording
|
||||
*/
|
||||
async sessionRecordingServiceDeleteSessionRecordingRaw(requestParameters: SessionRecordingServiceDeleteSessionRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling sessionRecordingServiceDeleteSessionRecording().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/session-recordings/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Session Recording
|
||||
*/
|
||||
async sessionRecordingServiceDeleteSessionRecording(requestParameters: SessionRecordingServiceDeleteSessionRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.sessionRecordingServiceDeleteSessionRecordingRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Download returns the contents of the specified resource in the specified mime type. Supports both Session ID and Session recording ID for looking up a Session recording. Supports both Connection ID and Connection recording ID to look up a Connection recording. A Channel recording ID is required to look up a Channel recording. The only supported mime type is \"application/x-asciicast\".
|
||||
*/
|
||||
async sessionRecordingServiceDownloadRaw(requestParameters: SessionRecordingServiceDownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling sessionRecordingServiceDownload().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['mimeType'] != null) {
|
||||
queryParameters['mime_type'] = requestParameters['mimeType'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/session-recordings/{id}:download`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.BlobApiResponse(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Download returns the contents of the specified resource in the specified mime type. Supports both Session ID and Session recording ID for looking up a Session recording. Supports both Connection ID and Connection recording ID to look up a Connection recording. A Channel recording ID is required to look up a Channel recording. The only supported mime type is \"application/x-asciicast\".
|
||||
*/
|
||||
async sessionRecordingServiceDownload(requestParameters: SessionRecordingServiceDownloadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
||||
const response = await this.sessionRecordingServiceDownloadRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* GetSessionRecording returns a stored Session recording if present. The provided request must include the Session recording ID for the Session recording being retrieved, or the ID of the Session that was recorded. If that ID is missing, malformed or reference a non existing resource, an error is returned.
|
||||
*/
|
||||
async sessionRecordingServiceGetSessionRecordingRaw(requestParameters: SessionRecordingServiceGetSessionRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesSessionrecordingsV1SessionRecording>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling sessionRecordingServiceGetSessionRecording().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/session-recordings/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* GetSessionRecording returns a stored Session recording if present. The provided request must include the Session recording ID for the Session recording being retrieved, or the ID of the Session that was recorded. If that ID is missing, malformed or reference a non existing resource, an error is returned.
|
||||
*/
|
||||
async sessionRecordingServiceGetSessionRecording(requestParameters: SessionRecordingServiceGetSessionRecordingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesSessionrecordingsV1SessionRecording> {
|
||||
const response = await this.sessionRecordingServiceGetSessionRecordingRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* ListSessionRecordings lists all Session recordings. Session recordings are ordered by start_time descending (most recently started first).
|
||||
*/
|
||||
async sessionRecordingServiceListSessionRecordingsRaw(requestParameters: SessionRecordingServiceListSessionRecordingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListSessionRecordingsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/session-recordings`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListSessionRecordingsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* ListSessionRecordings lists all Session recordings. Session recordings are ordered by start_time descending (most recently started first).
|
||||
*/
|
||||
async sessionRecordingServiceListSessionRecordings(requestParameters: SessionRecordingServiceListSessionRecordingsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListSessionRecordingsResponse> {
|
||||
const response = await this.sessionRecordingServiceListSessionRecordingsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* ReApplyStoragePolicy will recalculate the resultant set of policy and apply the result to the given session recording.
|
||||
*/
|
||||
async sessionRecordingServiceReApplyStoragePolicyRaw(requestParameters: SessionRecordingServiceReApplyStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesSessionrecordingsV1SessionRecording>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling sessionRecordingServiceReApplyStoragePolicy().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/session-recordings/{id}:reapply-storage-policy`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* ReApplyStoragePolicy will recalculate the resultant set of policy and apply the result to the given session recording.
|
||||
*/
|
||||
async sessionRecordingServiceReApplyStoragePolicy(requestParameters: SessionRecordingServiceReApplyStoragePolicyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesSessionrecordingsV1SessionRecording> {
|
||||
const response = await this.sessionRecordingServiceReApplyStoragePolicyRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,195 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesSessionsV1Session,
|
||||
ControllerApiServicesV1ListSessionsResponse,
|
||||
ControllerApiServicesV1SessionServiceCancelSessionBody,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesSessionsV1SessionFromJSON,
|
||||
ControllerApiResourcesSessionsV1SessionToJSON,
|
||||
ControllerApiServicesV1ListSessionsResponseFromJSON,
|
||||
ControllerApiServicesV1ListSessionsResponseToJSON,
|
||||
ControllerApiServicesV1SessionServiceCancelSessionBodyFromJSON,
|
||||
ControllerApiServicesV1SessionServiceCancelSessionBodyToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface SessionServiceCancelSessionRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1SessionServiceCancelSessionBody;
|
||||
}
|
||||
|
||||
export interface SessionServiceGetSessionRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface SessionServiceListSessionsRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
includeTerminated?: boolean;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class SessionServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Cancels a Session.
|
||||
*/
|
||||
async sessionServiceCancelSessionRaw(requestParameters: SessionServiceCancelSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesSessionsV1Session>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling sessionServiceCancelSession().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling sessionServiceCancelSession().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/sessions/{id}:cancel`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1SessionServiceCancelSessionBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesSessionsV1SessionFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancels a Session.
|
||||
*/
|
||||
async sessionServiceCancelSession(requestParameters: SessionServiceCancelSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesSessionsV1Session> {
|
||||
const response = await this.sessionServiceCancelSessionRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Session.
|
||||
*/
|
||||
async sessionServiceGetSessionRaw(requestParameters: SessionServiceGetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesSessionsV1Session>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling sessionServiceGetSession().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/sessions/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesSessionsV1SessionFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Session.
|
||||
*/
|
||||
async sessionServiceGetSession(requestParameters: SessionServiceGetSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesSessionsV1Session> {
|
||||
const response = await this.sessionServiceGetSessionRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Sessions.
|
||||
*/
|
||||
async sessionServiceListSessionsRaw(requestParameters: SessionServiceListSessionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListSessionsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['includeTerminated'] != null) {
|
||||
queryParameters['include_terminated'] = requestParameters['includeTerminated'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/sessions`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListSessionsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Sessions.
|
||||
*/
|
||||
async sessionServiceListSessions(requestParameters: SessionServiceListSessionsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListSessionsResponse> {
|
||||
const response = await this.sessionServiceListSessionsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,277 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesStoragebucketsV1StorageBucket,
|
||||
ControllerApiServicesV1ListStorageBucketsResponse,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON,
|
||||
ControllerApiResourcesStoragebucketsV1StorageBucketToJSON,
|
||||
ControllerApiServicesV1ListStorageBucketsResponseFromJSON,
|
||||
ControllerApiServicesV1ListStorageBucketsResponseToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface StorageBucketServiceCreateStorageBucketRequest {
|
||||
item: Omit<ControllerApiResourcesStoragebucketsV1StorageBucket, 'id'|'created_time'|'updated_time'|'secrets_hmac'|'authorized_actions'>;
|
||||
pluginName?: string;
|
||||
}
|
||||
|
||||
export interface StorageBucketServiceDeleteStorageBucketRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface StorageBucketServiceGetStorageBucketRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface StorageBucketServiceListStorageBucketsRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface StorageBucketServiceUpdateStorageBucketRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesStoragebucketsV1StorageBucket, 'id'|'created_time'|'updated_time'|'secrets_hmac'|'authorized_actions'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class StorageBucketServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Creates a Storage Bucket
|
||||
*/
|
||||
async storageBucketServiceCreateStorageBucketRaw(requestParameters: StorageBucketServiceCreateStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesStoragebucketsV1StorageBucket>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling storageBucketServiceCreateStorageBucket().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['pluginName'] != null) {
|
||||
queryParameters['plugin_name'] = requestParameters['pluginName'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/storage-buckets`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesStoragebucketsV1StorageBucketToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a Storage Bucket
|
||||
*/
|
||||
async storageBucketServiceCreateStorageBucket(requestParameters: StorageBucketServiceCreateStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesStoragebucketsV1StorageBucket> {
|
||||
const response = await this.storageBucketServiceCreateStorageBucketRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Storage Bucket
|
||||
*/
|
||||
async storageBucketServiceDeleteStorageBucketRaw(requestParameters: StorageBucketServiceDeleteStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling storageBucketServiceDeleteStorageBucket().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/storage-buckets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Storage Bucket
|
||||
*/
|
||||
async storageBucketServiceDeleteStorageBucket(requestParameters: StorageBucketServiceDeleteStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.storageBucketServiceDeleteStorageBucketRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Storage Bucket.
|
||||
*/
|
||||
async storageBucketServiceGetStorageBucketRaw(requestParameters: StorageBucketServiceGetStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesStoragebucketsV1StorageBucket>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling storageBucketServiceGetStorageBucket().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/storage-buckets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Storage Bucket.
|
||||
*/
|
||||
async storageBucketServiceGetStorageBucket(requestParameters: StorageBucketServiceGetStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesStoragebucketsV1StorageBucket> {
|
||||
const response = await this.storageBucketServiceGetStorageBucketRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of Storage Buckets.
|
||||
*/
|
||||
async storageBucketServiceListStorageBucketsRaw(requestParameters: StorageBucketServiceListStorageBucketsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListStorageBucketsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/storage-buckets`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListStorageBucketsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a list of Storage Buckets.
|
||||
*/
|
||||
async storageBucketServiceListStorageBuckets(requestParameters: StorageBucketServiceListStorageBucketsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListStorageBucketsResponse> {
|
||||
const response = await this.storageBucketServiceListStorageBucketsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Storage Bucket
|
||||
*/
|
||||
async storageBucketServiceUpdateStorageBucketRaw(requestParameters: StorageBucketServiceUpdateStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesStoragebucketsV1StorageBucket>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling storageBucketServiceUpdateStorageBucket().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling storageBucketServiceUpdateStorageBucket().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/storage-buckets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesStoragebucketsV1StorageBucketToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Storage Bucket
|
||||
*/
|
||||
async storageBucketServiceUpdateStorageBucket(requestParameters: StorageBucketServiceUpdateStorageBucketRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesStoragebucketsV1StorageBucket> {
|
||||
const response = await this.storageBucketServiceUpdateStorageBucketRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,660 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesTargetsV1SessionAuthorization,
|
||||
ControllerApiResourcesTargetsV1Target,
|
||||
ControllerApiServicesV1ListTargetsResponse,
|
||||
ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody,
|
||||
ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody,
|
||||
ControllerApiServicesV1TargetServiceAuthorizeSessionBody,
|
||||
ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody,
|
||||
ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody,
|
||||
ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody,
|
||||
ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1SessionAuthorizationFromJSON,
|
||||
ControllerApiResourcesTargetsV1SessionAuthorizationToJSON,
|
||||
ControllerApiResourcesTargetsV1TargetFromJSON,
|
||||
ControllerApiResourcesTargetsV1TargetToJSON,
|
||||
ControllerApiServicesV1ListTargetsResponseFromJSON,
|
||||
ControllerApiServicesV1ListTargetsResponseToJSON,
|
||||
ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyFromJSON,
|
||||
ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyToJSON,
|
||||
ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyFromJSON,
|
||||
ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyToJSON,
|
||||
ControllerApiServicesV1TargetServiceAuthorizeSessionBodyFromJSON,
|
||||
ControllerApiServicesV1TargetServiceAuthorizeSessionBodyToJSON,
|
||||
ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyFromJSON,
|
||||
ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyToJSON,
|
||||
ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyFromJSON,
|
||||
ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyToJSON,
|
||||
ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyFromJSON,
|
||||
ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyToJSON,
|
||||
ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyFromJSON,
|
||||
ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface TargetServiceAddTargetCredentialSourcesRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBody;
|
||||
}
|
||||
|
||||
export interface TargetServiceAddTargetHostSourcesRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1TargetServiceAddTargetHostSourcesBody;
|
||||
}
|
||||
|
||||
export interface TargetServiceAuthorizeSessionRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1TargetServiceAuthorizeSessionBody;
|
||||
}
|
||||
|
||||
export interface TargetServiceCreateTargetRequest {
|
||||
item: Omit<ControllerApiResourcesTargetsV1Target, 'id'|'created_time'|'updated_time'|'host_source_ids'|'host_sources'|'brokered_credential_source_ids'|'brokered_credential_sources'|'injected_application_credential_source_ids'|'injected_application_credential_sources'|'authorized_actions'|'aliases'>;
|
||||
}
|
||||
|
||||
export interface TargetServiceDeleteTargetRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface TargetServiceGetTargetRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface TargetServiceListTargetsRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface TargetServiceRemoveTargetCredentialSourcesRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBody;
|
||||
}
|
||||
|
||||
export interface TargetServiceRemoveTargetHostSourcesRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBody;
|
||||
}
|
||||
|
||||
export interface TargetServiceSetTargetCredentialSourcesRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBody;
|
||||
}
|
||||
|
||||
export interface TargetServiceSetTargetHostSourcesRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1TargetServiceSetTargetHostSourcesBody;
|
||||
}
|
||||
|
||||
export interface TargetServiceUpdateTargetRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesTargetsV1Target, 'id'|'created_time'|'updated_time'|'host_source_ids'|'host_sources'|'brokered_credential_source_ids'|'brokered_credential_sources'|'injected_application_credential_source_ids'|'injected_application_credential_sources'|'authorized_actions'|'aliases'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class TargetServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Adds existing Credential Sources to a Target.
|
||||
*/
|
||||
async targetServiceAddTargetCredentialSourcesRaw(requestParameters: TargetServiceAddTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesTargetsV1Target>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling targetServiceAddTargetCredentialSources().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling targetServiceAddTargetCredentialSources().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets/{id}:add-credential-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1TargetServiceAddTargetCredentialSourcesBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds existing Credential Sources to a Target.
|
||||
*/
|
||||
async targetServiceAddTargetCredentialSources(requestParameters: TargetServiceAddTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesTargetsV1Target> {
|
||||
const response = await this.targetServiceAddTargetCredentialSourcesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds existing Host Sources to a Target. Cannot be used on targets that have their address field set.
|
||||
*/
|
||||
async targetServiceAddTargetHostSourcesRaw(requestParameters: TargetServiceAddTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesTargetsV1Target>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling targetServiceAddTargetHostSources().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling targetServiceAddTargetHostSources().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets/{id}:add-host-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1TargetServiceAddTargetHostSourcesBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds existing Host Sources to a Target. Cannot be used on targets that have their address field set.
|
||||
*/
|
||||
async targetServiceAddTargetHostSources(requestParameters: TargetServiceAddTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesTargetsV1Target> {
|
||||
const response = await this.targetServiceAddTargetHostSourcesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Authorizes a Session.
|
||||
*/
|
||||
async targetServiceAuthorizeSessionRaw(requestParameters: TargetServiceAuthorizeSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesTargetsV1SessionAuthorization>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling targetServiceAuthorizeSession().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling targetServiceAuthorizeSession().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets/{id}:authorize-session`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1TargetServiceAuthorizeSessionBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1SessionAuthorizationFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Authorizes a Session.
|
||||
*/
|
||||
async targetServiceAuthorizeSession(requestParameters: TargetServiceAuthorizeSessionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesTargetsV1SessionAuthorization> {
|
||||
const response = await this.targetServiceAuthorizeSessionRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Target.
|
||||
*/
|
||||
async targetServiceCreateTargetRaw(requestParameters: TargetServiceCreateTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesTargetsV1Target>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling targetServiceCreateTarget().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesTargetsV1TargetToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Target.
|
||||
*/
|
||||
async targetServiceCreateTarget(requestParameters: TargetServiceCreateTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesTargetsV1Target> {
|
||||
const response = await this.targetServiceCreateTargetRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Target.
|
||||
*/
|
||||
async targetServiceDeleteTargetRaw(requestParameters: TargetServiceDeleteTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling targetServiceDeleteTarget().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Target.
|
||||
*/
|
||||
async targetServiceDeleteTarget(requestParameters: TargetServiceDeleteTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.targetServiceDeleteTargetRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Target.
|
||||
*/
|
||||
async targetServiceGetTargetRaw(requestParameters: TargetServiceGetTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesTargetsV1Target>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling targetServiceGetTarget().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Target.
|
||||
*/
|
||||
async targetServiceGetTarget(requestParameters: TargetServiceGetTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesTargetsV1Target> {
|
||||
const response = await this.targetServiceGetTargetRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Targets.
|
||||
*/
|
||||
async targetServiceListTargetsRaw(requestParameters: TargetServiceListTargetsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListTargetsResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListTargetsResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Targets.
|
||||
*/
|
||||
async targetServiceListTargets(requestParameters: TargetServiceListTargetsRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListTargetsResponse> {
|
||||
const response = await this.targetServiceListTargetsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes Credential Sources from the Target.
|
||||
*/
|
||||
async targetServiceRemoveTargetCredentialSourcesRaw(requestParameters: TargetServiceRemoveTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesTargetsV1Target>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling targetServiceRemoveTargetCredentialSources().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling targetServiceRemoveTargetCredentialSources().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets/{id}:remove-credential-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1TargetServiceRemoveTargetCredentialSourcesBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes Credential Sources from the Target.
|
||||
*/
|
||||
async targetServiceRemoveTargetCredentialSources(requestParameters: TargetServiceRemoveTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesTargetsV1Target> {
|
||||
const response = await this.targetServiceRemoveTargetCredentialSourcesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes Host Sources from the Target.
|
||||
*/
|
||||
async targetServiceRemoveTargetHostSourcesRaw(requestParameters: TargetServiceRemoveTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesTargetsV1Target>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling targetServiceRemoveTargetHostSources().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling targetServiceRemoveTargetHostSources().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets/{id}:remove-host-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1TargetServiceRemoveTargetHostSourcesBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes Host Sources from the Target.
|
||||
*/
|
||||
async targetServiceRemoveTargetHostSources(requestParameters: TargetServiceRemoveTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesTargetsV1Target> {
|
||||
const response = await this.targetServiceRemoveTargetHostSourcesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Credential Sources on the Target.
|
||||
*/
|
||||
async targetServiceSetTargetCredentialSourcesRaw(requestParameters: TargetServiceSetTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesTargetsV1Target>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling targetServiceSetTargetCredentialSources().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling targetServiceSetTargetCredentialSources().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets/{id}:set-credential-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1TargetServiceSetTargetCredentialSourcesBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Credential Sources on the Target.
|
||||
*/
|
||||
async targetServiceSetTargetCredentialSources(requestParameters: TargetServiceSetTargetCredentialSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesTargetsV1Target> {
|
||||
const response = await this.targetServiceSetTargetCredentialSourcesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sources the Host Sources on the Target. Cannot be used on targets that have their address field set.
|
||||
*/
|
||||
async targetServiceSetTargetHostSourcesRaw(requestParameters: TargetServiceSetTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesTargetsV1Target>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling targetServiceSetTargetHostSources().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling targetServiceSetTargetHostSources().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets/{id}:set-host-sources`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1TargetServiceSetTargetHostSourcesBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sources the Host Sources on the Target. Cannot be used on targets that have their address field set.
|
||||
*/
|
||||
async targetServiceSetTargetHostSources(requestParameters: TargetServiceSetTargetHostSourcesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesTargetsV1Target> {
|
||||
const response = await this.targetServiceSetTargetHostSourcesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Target.
|
||||
*/
|
||||
async targetServiceUpdateTargetRaw(requestParameters: TargetServiceUpdateTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesTargetsV1Target>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling targetServiceUpdateTarget().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling targetServiceUpdateTarget().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/targets/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesTargetsV1TargetToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesTargetsV1TargetFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Target.
|
||||
*/
|
||||
async targetServiceUpdateTarget(requestParameters: TargetServiceUpdateTargetRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesTargetsV1Target> {
|
||||
const response = await this.targetServiceUpdateTargetRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,491 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesUsersV1User,
|
||||
ControllerApiServicesV1ListResolvableAliasesResponse,
|
||||
ControllerApiServicesV1ListUsersResponse,
|
||||
ControllerApiServicesV1UserServiceAddUserAccountsBody,
|
||||
ControllerApiServicesV1UserServiceRemoveUserAccountsBody,
|
||||
ControllerApiServicesV1UserServiceSetUserAccountsBody,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesUsersV1UserFromJSON,
|
||||
ControllerApiResourcesUsersV1UserToJSON,
|
||||
ControllerApiServicesV1ListResolvableAliasesResponseFromJSON,
|
||||
ControllerApiServicesV1ListResolvableAliasesResponseToJSON,
|
||||
ControllerApiServicesV1ListUsersResponseFromJSON,
|
||||
ControllerApiServicesV1ListUsersResponseToJSON,
|
||||
ControllerApiServicesV1UserServiceAddUserAccountsBodyFromJSON,
|
||||
ControllerApiServicesV1UserServiceAddUserAccountsBodyToJSON,
|
||||
ControllerApiServicesV1UserServiceRemoveUserAccountsBodyFromJSON,
|
||||
ControllerApiServicesV1UserServiceRemoveUserAccountsBodyToJSON,
|
||||
ControllerApiServicesV1UserServiceSetUserAccountsBodyFromJSON,
|
||||
ControllerApiServicesV1UserServiceSetUserAccountsBodyToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface UserServiceAddUserAccountsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1UserServiceAddUserAccountsBody;
|
||||
}
|
||||
|
||||
export interface UserServiceCreateUserRequest {
|
||||
item: Omit<ControllerApiResourcesUsersV1User, 'id'|'created_time'|'updated_time'|'account_ids'|'accounts'|'authorized_actions'|'login_name'|'full_name'|'email'|'primary_account_id'>;
|
||||
}
|
||||
|
||||
export interface UserServiceDeleteUserRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface UserServiceGetUserRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface UserServiceListResolvableAliasesRequest {
|
||||
id: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface UserServiceListUsersRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
listToken?: string;
|
||||
pageSize?: number;
|
||||
}
|
||||
|
||||
export interface UserServiceRemoveUserAccountsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1UserServiceRemoveUserAccountsBody;
|
||||
}
|
||||
|
||||
export interface UserServiceSetUserAccountsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1UserServiceSetUserAccountsBody;
|
||||
}
|
||||
|
||||
export interface UserServiceUpdateUserRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesUsersV1User, 'id'|'created_time'|'updated_time'|'account_ids'|'accounts'|'authorized_actions'|'login_name'|'full_name'|'email'|'primary_account_id'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class UserServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Associates an Account to a User.
|
||||
*/
|
||||
async userServiceAddUserAccountsRaw(requestParameters: UserServiceAddUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesUsersV1User>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling userServiceAddUserAccounts().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling userServiceAddUserAccounts().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/users/{id}:add-accounts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1UserServiceAddUserAccountsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Associates an Account to a User.
|
||||
*/
|
||||
async userServiceAddUserAccounts(requestParameters: UserServiceAddUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesUsersV1User> {
|
||||
const response = await this.userServiceAddUserAccountsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single User.
|
||||
*/
|
||||
async userServiceCreateUserRaw(requestParameters: UserServiceCreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesUsersV1User>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling userServiceCreateUser().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/users`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesUsersV1UserToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single User.
|
||||
*/
|
||||
async userServiceCreateUser(requestParameters: UserServiceCreateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesUsersV1User> {
|
||||
const response = await this.userServiceCreateUserRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a User.
|
||||
*/
|
||||
async userServiceDeleteUserRaw(requestParameters: UserServiceDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling userServiceDeleteUser().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a User.
|
||||
*/
|
||||
async userServiceDeleteUser(requestParameters: UserServiceDeleteUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.userServiceDeleteUserRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single User.
|
||||
*/
|
||||
async userServiceGetUserRaw(requestParameters: UserServiceGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesUsersV1User>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling userServiceGetUser().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single User.
|
||||
*/
|
||||
async userServiceGetUser(requestParameters: UserServiceGetUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesUsersV1User> {
|
||||
const response = await this.userServiceGetUserRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Aliases which point to a resource for which the requester has some permission.
|
||||
*/
|
||||
async userServiceListResolvableAliasesRaw(requestParameters: UserServiceListResolvableAliasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListResolvableAliasesResponse>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling userServiceListResolvableAliases().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/users/{id}:list-resolvable-aliases`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListResolvableAliasesResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Aliases which point to a resource for which the requester has some permission.
|
||||
*/
|
||||
async userServiceListResolvableAliases(requestParameters: UserServiceListResolvableAliasesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListResolvableAliasesResponse> {
|
||||
const response = await this.userServiceListResolvableAliasesRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Users.
|
||||
*/
|
||||
async userServiceListUsersRaw(requestParameters: UserServiceListUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListUsersResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
if (requestParameters['listToken'] != null) {
|
||||
queryParameters['list_token'] = requestParameters['listToken'];
|
||||
}
|
||||
|
||||
if (requestParameters['pageSize'] != null) {
|
||||
queryParameters['page_size'] = requestParameters['pageSize'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/users`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListUsersResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Users.
|
||||
*/
|
||||
async userServiceListUsers(requestParameters: UserServiceListUsersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListUsersResponse> {
|
||||
const response = await this.userServiceListUsersRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified Accounts from being associated with the provided User.
|
||||
*/
|
||||
async userServiceRemoveUserAccountsRaw(requestParameters: UserServiceRemoveUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesUsersV1User>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling userServiceRemoveUserAccounts().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling userServiceRemoveUserAccounts().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/users/{id}:remove-accounts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1UserServiceRemoveUserAccountsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the specified Accounts from being associated with the provided User.
|
||||
*/
|
||||
async userServiceRemoveUserAccounts(requestParameters: UserServiceRemoveUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesUsersV1User> {
|
||||
const response = await this.userServiceRemoveUserAccountsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Accounts associated to the User to exactly the list of provided in the request, removing any Accounts that are not specified.
|
||||
*/
|
||||
async userServiceSetUserAccountsRaw(requestParameters: UserServiceSetUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesUsersV1User>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling userServiceSetUserAccounts().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling userServiceSetUserAccounts().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/users/{id}:set-accounts`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1UserServiceSetUserAccountsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the Accounts associated to the User to exactly the list of provided in the request, removing any Accounts that are not specified.
|
||||
*/
|
||||
async userServiceSetUserAccounts(requestParameters: UserServiceSetUserAccountsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesUsersV1User> {
|
||||
const response = await this.userServiceSetUserAccountsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a User.
|
||||
*/
|
||||
async userServiceUpdateUserRaw(requestParameters: UserServiceUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesUsersV1User>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling userServiceUpdateUser().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling userServiceUpdateUser().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/users/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesUsersV1UserToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesUsersV1UserFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a User.
|
||||
*/
|
||||
async userServiceUpdateUser(requestParameters: UserServiceUpdateUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesUsersV1User> {
|
||||
const response = await this.userServiceUpdateUserRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,550 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
|
||||
import * as runtime from '../runtime';
|
||||
import type {
|
||||
ControllerApiResourcesWorkersV1CertificateAuthority,
|
||||
ControllerApiResourcesWorkersV1Worker,
|
||||
ControllerApiServicesV1ListWorkersResponse,
|
||||
ControllerApiServicesV1WorkerServiceAddWorkerTagsBody,
|
||||
ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody,
|
||||
ControllerApiServicesV1WorkerServiceSetWorkerTagsBody,
|
||||
ControllerApiV1Error,
|
||||
} from '../models/index';
|
||||
import {
|
||||
ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON,
|
||||
ControllerApiResourcesWorkersV1CertificateAuthorityToJSON,
|
||||
ControllerApiResourcesWorkersV1WorkerFromJSON,
|
||||
ControllerApiResourcesWorkersV1WorkerToJSON,
|
||||
ControllerApiServicesV1ListWorkersResponseFromJSON,
|
||||
ControllerApiServicesV1ListWorkersResponseToJSON,
|
||||
ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyFromJSON,
|
||||
ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyToJSON,
|
||||
ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyFromJSON,
|
||||
ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyToJSON,
|
||||
ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyFromJSON,
|
||||
ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyToJSON,
|
||||
ControllerApiV1ErrorFromJSON,
|
||||
ControllerApiV1ErrorToJSON,
|
||||
} from '../models/index';
|
||||
|
||||
export interface WorkerServiceAddWorkerTagsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1WorkerServiceAddWorkerTagsBody;
|
||||
}
|
||||
|
||||
export interface WorkerServiceCreateControllerLedRequest {
|
||||
item: Omit<ControllerApiResourcesWorkersV1Worker, 'id'|'created_time'|'updated_time'|'address'|'canonical_tags'|'config_tags'|'last_status_time'|'controller_generated_activation_token'|'active_connection_count'|'type'|'api_tags'|'release_version'|'directly_connected_downstream_workers'|'authorized_actions'|'local_storage_state'|'remote_storage_state'>;
|
||||
}
|
||||
|
||||
export interface WorkerServiceCreateWorkerLedRequest {
|
||||
item: Omit<ControllerApiResourcesWorkersV1Worker, 'id'|'created_time'|'updated_time'|'address'|'canonical_tags'|'config_tags'|'last_status_time'|'controller_generated_activation_token'|'active_connection_count'|'type'|'api_tags'|'release_version'|'directly_connected_downstream_workers'|'authorized_actions'|'local_storage_state'|'remote_storage_state'>;
|
||||
}
|
||||
|
||||
export interface WorkerServiceDeleteWorkerRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface WorkerServiceGetWorkerRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
export interface WorkerServiceListWorkersRequest {
|
||||
scopeId?: string;
|
||||
recursive?: boolean;
|
||||
filter?: string;
|
||||
}
|
||||
|
||||
export interface WorkerServiceReadCertificateAuthorityRequest {
|
||||
scopeId?: string;
|
||||
}
|
||||
|
||||
export interface WorkerServiceReinitializeCertificateAuthorityRequest {
|
||||
scopeId?: string;
|
||||
}
|
||||
|
||||
export interface WorkerServiceRemoveWorkerTagsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBody;
|
||||
}
|
||||
|
||||
export interface WorkerServiceSetWorkerTagsRequest {
|
||||
id: string;
|
||||
body: ControllerApiServicesV1WorkerServiceSetWorkerTagsBody;
|
||||
}
|
||||
|
||||
export interface WorkerServiceUpdateWorkerRequest {
|
||||
id: string;
|
||||
item: Omit<ControllerApiResourcesWorkersV1Worker, 'id'|'created_time'|'updated_time'|'address'|'canonical_tags'|'config_tags'|'last_status_time'|'controller_generated_activation_token'|'active_connection_count'|'type'|'api_tags'|'release_version'|'directly_connected_downstream_workers'|'authorized_actions'|'local_storage_state'|'remote_storage_state'>;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
export class WorkerServiceApi extends runtime.BaseAPI {
|
||||
|
||||
/**
|
||||
* Adds api tags to an existing Worker.
|
||||
*/
|
||||
async workerServiceAddWorkerTagsRaw(requestParameters: WorkerServiceAddWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesWorkersV1Worker>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling workerServiceAddWorkerTags().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling workerServiceAddWorkerTags().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers/{id}:add-worker-tags`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1WorkerServiceAddWorkerTagsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds api tags to an existing Worker.
|
||||
*/
|
||||
async workerServiceAddWorkerTags(requestParameters: WorkerServiceAddWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesWorkersV1Worker> {
|
||||
const response = await this.workerServiceAddWorkerTagsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Worker.
|
||||
*/
|
||||
async workerServiceCreateControllerLedRaw(requestParameters: WorkerServiceCreateControllerLedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesWorkersV1Worker>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling workerServiceCreateControllerLed().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers:create:controller-led`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesWorkersV1WorkerToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Worker.
|
||||
*/
|
||||
async workerServiceCreateControllerLed(requestParameters: WorkerServiceCreateControllerLedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesWorkersV1Worker> {
|
||||
const response = await this.workerServiceCreateControllerLedRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Worker.
|
||||
*/
|
||||
async workerServiceCreateWorkerLedRaw(requestParameters: WorkerServiceCreateWorkerLedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesWorkersV1Worker>> {
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling workerServiceCreateWorkerLed().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers:create:worker-led`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesWorkersV1WorkerToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a single Worker.
|
||||
*/
|
||||
async workerServiceCreateWorkerLed(requestParameters: WorkerServiceCreateWorkerLedRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesWorkersV1Worker> {
|
||||
const response = await this.workerServiceCreateWorkerLedRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Worker.
|
||||
*/
|
||||
async workerServiceDeleteWorkerRaw(requestParameters: WorkerServiceDeleteWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<object>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling workerServiceDeleteWorker().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'DELETE',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse<any>(response);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes a Worker.
|
||||
*/
|
||||
async workerServiceDeleteWorker(requestParameters: WorkerServiceDeleteWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<object> {
|
||||
const response = await this.workerServiceDeleteWorkerRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Worker.
|
||||
*/
|
||||
async workerServiceGetWorkerRaw(requestParameters: WorkerServiceGetWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesWorkersV1Worker>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling workerServiceGetWorker().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a single Worker.
|
||||
*/
|
||||
async workerServiceGetWorker(requestParameters: WorkerServiceGetWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesWorkersV1Worker> {
|
||||
const response = await this.workerServiceGetWorkerRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Workers.
|
||||
*/
|
||||
async workerServiceListWorkersRaw(requestParameters: WorkerServiceListWorkersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiServicesV1ListWorkersResponse>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
if (requestParameters['recursive'] != null) {
|
||||
queryParameters['recursive'] = requestParameters['recursive'];
|
||||
}
|
||||
|
||||
if (requestParameters['filter'] != null) {
|
||||
queryParameters['filter'] = requestParameters['filter'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiServicesV1ListWorkersResponseFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Lists all Workers.
|
||||
*/
|
||||
async workerServiceListWorkers(requestParameters: WorkerServiceListWorkersRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiServicesV1ListWorkersResponse> {
|
||||
const response = await this.workerServiceListWorkersRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves root certificates used for worker authentication.
|
||||
*/
|
||||
async workerServiceReadCertificateAuthorityRaw(requestParameters: WorkerServiceReadCertificateAuthorityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesWorkersV1CertificateAuthority>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers:read-certificate-authority`,
|
||||
method: 'GET',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves root certificates used for worker authentication.
|
||||
*/
|
||||
async workerServiceReadCertificateAuthority(requestParameters: WorkerServiceReadCertificateAuthorityRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesWorkersV1CertificateAuthority> {
|
||||
const response = await this.workerServiceReadCertificateAuthorityRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reinitializes root certificates used for worker authentication.
|
||||
*/
|
||||
async workerServiceReinitializeCertificateAuthorityRaw(requestParameters: WorkerServiceReinitializeCertificateAuthorityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesWorkersV1CertificateAuthority>> {
|
||||
const queryParameters: any = {};
|
||||
|
||||
if (requestParameters['scopeId'] != null) {
|
||||
queryParameters['scope_id'] = requestParameters['scopeId'];
|
||||
}
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers:reinitialize-certificate-authority`,
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Reinitializes root certificates used for worker authentication.
|
||||
*/
|
||||
async workerServiceReinitializeCertificateAuthority(requestParameters: WorkerServiceReinitializeCertificateAuthorityRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesWorkersV1CertificateAuthority> {
|
||||
const response = await this.workerServiceReinitializeCertificateAuthorityRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes api tags from an existing Worker.
|
||||
*/
|
||||
async workerServiceRemoveWorkerTagsRaw(requestParameters: WorkerServiceRemoveWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesWorkersV1Worker>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling workerServiceRemoveWorkerTags().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling workerServiceRemoveWorkerTags().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers/{id}:remove-worker-tags`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1WorkerServiceRemoveWorkerTagsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes api tags from an existing Worker.
|
||||
*/
|
||||
async workerServiceRemoveWorkerTags(requestParameters: WorkerServiceRemoveWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesWorkersV1Worker> {
|
||||
const response = await this.workerServiceRemoveWorkerTagsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets api tags for an existing Worker.
|
||||
*/
|
||||
async workerServiceSetWorkerTagsRaw(requestParameters: WorkerServiceSetWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesWorkersV1Worker>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling workerServiceSetWorkerTags().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['body'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'body',
|
||||
'Required parameter "body" was null or undefined when calling workerServiceSetWorkerTags().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers/{id}:set-worker-tags`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'POST',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiServicesV1WorkerServiceSetWorkerTagsBodyToJSON(requestParameters['body']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets api tags for an existing Worker.
|
||||
*/
|
||||
async workerServiceSetWorkerTags(requestParameters: WorkerServiceSetWorkerTagsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesWorkersV1Worker> {
|
||||
const response = await this.workerServiceSetWorkerTagsRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Worker.
|
||||
*/
|
||||
async workerServiceUpdateWorkerRaw(requestParameters: WorkerServiceUpdateWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ControllerApiResourcesWorkersV1Worker>> {
|
||||
if (requestParameters['id'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'id',
|
||||
'Required parameter "id" was null or undefined when calling workerServiceUpdateWorker().'
|
||||
);
|
||||
}
|
||||
|
||||
if (requestParameters['item'] == null) {
|
||||
throw new runtime.RequiredError(
|
||||
'item',
|
||||
'Required parameter "item" was null or undefined when calling workerServiceUpdateWorker().'
|
||||
);
|
||||
}
|
||||
|
||||
const queryParameters: any = {};
|
||||
|
||||
const headerParameters: runtime.HTTPHeaders = {};
|
||||
|
||||
headerParameters['Content-Type'] = 'application/json';
|
||||
|
||||
if (this.configuration && this.configuration.apiKey) {
|
||||
headerParameters["Authorization"] = await this.configuration.apiKey("Authorization"); // ApiKeyAuth authentication
|
||||
}
|
||||
|
||||
const response = await this.request({
|
||||
path: `/v1/workers/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(requestParameters['id']))),
|
||||
method: 'PATCH',
|
||||
headers: headerParameters,
|
||||
query: queryParameters,
|
||||
body: ControllerApiResourcesWorkersV1WorkerToJSON(requestParameters['item']),
|
||||
}, initOverrides);
|
||||
|
||||
return new runtime.JSONApiResponse(response, (jsonValue) => ControllerApiResourcesWorkersV1WorkerFromJSON(jsonValue));
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates a Worker.
|
||||
*/
|
||||
async workerServiceUpdateWorker(requestParameters: WorkerServiceUpdateWorkerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ControllerApiResourcesWorkersV1Worker> {
|
||||
const response = await this.workerServiceUpdateWorkerRaw(requestParameters, initOverrides);
|
||||
return await response.value();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './AccountServiceApi';
|
||||
export * from './AliasServiceApi';
|
||||
export * from './AuthMethodServiceApi';
|
||||
export * from './AuthTokenServiceApi';
|
||||
export * from './BillingServiceApi';
|
||||
export * from './CredentialLibraryServiceApi';
|
||||
export * from './CredentialServiceApi';
|
||||
export * from './CredentialStoreServiceApi';
|
||||
export * from './GroupServiceApi';
|
||||
export * from './HostCatalogServiceApi';
|
||||
export * from './HostServiceApi';
|
||||
export * from './HostSetServiceApi';
|
||||
export * from './ManagedGroupServiceApi';
|
||||
export * from './PolicyServiceApi';
|
||||
export * from './RoleServiceApi';
|
||||
export * from './ScopeServiceApi';
|
||||
export * from './SessionRecordingServiceApi';
|
||||
export * from './SessionServiceApi';
|
||||
export * from './StorageBucketServiceApi';
|
||||
export * from './TargetServiceApi';
|
||||
export * from './UserServiceApi';
|
||||
export * from './WorkerServiceApi';
|
||||
@@ -0,0 +1,5 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export * from './runtime';
|
||||
export * from './apis/index';
|
||||
export * from './models/index';
|
||||
@@ -0,0 +1,187 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
export interface ControllerApiResourcesAccountsV1Account {
|
||||
/**
|
||||
* The ID of the account.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation fails if the version does not match the latest known good version.
|
||||
* Version is not required when you create an account.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The type of this account. If you do not set an account type, Boundary infers it from the type of the auth method.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The ID of the auth method that is associated with this account.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
authMethodId?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific account type. The schema of this field depends on the type of the auth method that you create the account in.
|
||||
* For password auth methods, the parameters are:
|
||||
* ```json
|
||||
* {
|
||||
* "login_name": "login_name",
|
||||
* "password": "password"
|
||||
* }
|
||||
* ```
|
||||
* For OIDC auth methods, the parameters are:
|
||||
* ```json
|
||||
* {
|
||||
* "issuer": "issuer",
|
||||
* "subject": "subject",
|
||||
* "full_name": "full_name",
|
||||
* "email": "email",
|
||||
* "token_claims": {},
|
||||
* "userinfo_claims": {}
|
||||
* }
|
||||
* ```
|
||||
* For LDAP auth methods, the parameters are:
|
||||
* ```json
|
||||
* {
|
||||
* "login_name": "login_name",
|
||||
* "full_name": "full_name",
|
||||
* "email": "email",
|
||||
* "dn": "dn",
|
||||
* "member_of_groups": ["member_of_groups"]
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
*
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
readonly managedGroupIds?: Array<string>;
|
||||
/**
|
||||
* The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesAccountsV1Account
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesAccountsV1Account interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesAccountsV1Account(value: object): value is ControllerApiResourcesAccountsV1Account {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAccountsV1AccountFromJSON(json: any): ControllerApiResourcesAccountsV1Account {
|
||||
return ControllerApiResourcesAccountsV1AccountFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAccountsV1AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesAccountsV1Account {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'authMethodId': json['auth_method_id'] == null ? undefined : json['auth_method_id'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'managedGroupIds': json['managed_group_ids'] == null ? undefined : json['managed_group_ids'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAccountsV1AccountToJSON(json: any): ControllerApiResourcesAccountsV1Account {
|
||||
return ControllerApiResourcesAccountsV1AccountToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAccountsV1AccountToJSONTyped(value?: Omit<ControllerApiResourcesAccountsV1Account, 'id'|'created_time'|'updated_time'|'managed_group_ids'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'auth_method_id': value['authMethodId'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,175 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
export interface ControllerApiResourcesAliasesV1Alias {
|
||||
/**
|
||||
* The ID of the alias.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the scope of which this alias is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional user-set name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set descripton for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation fails if the version does not match the latest known good version.
|
||||
* Version is not required when you create an alias.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* Value of the alias. This is the value referenced by the user that
|
||||
* is resolved to the destination id.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
value?: string;
|
||||
/**
|
||||
* destination_id is the id of the resource that this alias points to.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
destinationId?: string;
|
||||
/**
|
||||
* type is the type of the alias.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific alias type. The schema of this field depends on the type of resource that you create the alias for.
|
||||
* For target aliases, the parameters are:
|
||||
* ```json
|
||||
* {
|
||||
* "authorize_session_arguments": {"host_id":"host_id"}
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesAliasesV1Alias
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesAliasesV1Alias interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesAliasesV1Alias(value: object): value is ControllerApiResourcesAliasesV1Alias {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAliasesV1AliasFromJSON(json: any): ControllerApiResourcesAliasesV1Alias {
|
||||
return ControllerApiResourcesAliasesV1AliasFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAliasesV1AliasFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesAliasesV1Alias {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'value': json['value'] == null ? undefined : json['value'],
|
||||
'destinationId': json['destination_id'] == null ? undefined : json['destination_id'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAliasesV1AliasToJSON(json: any): ControllerApiResourcesAliasesV1Alias {
|
||||
return ControllerApiResourcesAliasesV1AliasToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAliasesV1AliasToJSONTyped(value?: Omit<ControllerApiResourcesAliasesV1Alias, 'id'|'created_time'|'updated_time'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'value': value['value'],
|
||||
'destination_id': value['destinationId'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,218 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
export interface ControllerApiResourcesAuthmethodsV1AuthMethod {
|
||||
/**
|
||||
* The ID of the auth method.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the Scope of which this auth method is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* Version is not required when you create an auth method.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The auth method type.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific auth method type. The schema of this field depends on the type of the auth method that you create want to create.
|
||||
* For password auth methods, the parameters are:
|
||||
* ```json
|
||||
* {
|
||||
* "min_login_name_length": "min_login_name_length",
|
||||
* "min_password_length": "min_password_length"
|
||||
* }
|
||||
* ```
|
||||
* For OIDC auth methods, the parameters are:
|
||||
* ```json
|
||||
* {
|
||||
* "issuer": "issuer",
|
||||
* "client_id": "client_id",
|
||||
* "client_secret": "client_secret",
|
||||
* "max_age": 3600,
|
||||
* "signing_algorithms": [],
|
||||
* "api_url_prefix": "api_url_prefix",
|
||||
* "idp_ca_certs": [],
|
||||
* "allowed_audiences": [],
|
||||
* "claims_scopes": [],
|
||||
* "account_claim_maps": [],
|
||||
* "disable_discovered_config_validation": false,
|
||||
* "prompts": []
|
||||
* }
|
||||
* ```
|
||||
* For LDAP auth methods, the parameters are:
|
||||
* ```json
|
||||
* {
|
||||
* "start_tls": false,
|
||||
* "insecure_tls": false,
|
||||
* "discover_dn": false,
|
||||
* "anon_group_search": false,
|
||||
* "upn_domain": "upn_domain",
|
||||
* "urls": [],
|
||||
* "user_dn": "user_dn",
|
||||
* "user_attr": "user_attr",
|
||||
* "user_filter": "user_filter",
|
||||
* "enable_groups": false,
|
||||
* "group_dn": "group_dn",
|
||||
* "group_attr": "group_attr",
|
||||
* "group_filter": "group_filter",
|
||||
* "certificates": [],
|
||||
* "client_certificate": "client_certificate",
|
||||
* "client_certificate_key": "client_certificate_key",
|
||||
* "bind_dn": "bind_dn",
|
||||
* "bind_password": "bind_password",
|
||||
* "use_token_groups": false,
|
||||
* "account_attribute_maps": [],
|
||||
* "maximum_page_size": 1000,
|
||||
* "dereference_aliases": "never"
|
||||
* }
|
||||
* ```
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Whether this auth method is the primary auth method for it's scope.
|
||||
* To change this value update the primary_auth_method_id field on the scope.
|
||||
* @type {boolean}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
readonly isPrimary?: boolean;
|
||||
/**
|
||||
* The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
/**
|
||||
* The authorized actions for the scope's collections.
|
||||
* @type {{ [key: string]: Array<object>; }}
|
||||
* @memberof ControllerApiResourcesAuthmethodsV1AuthMethod
|
||||
*/
|
||||
readonly authorizedCollectionActions?: { [key: string]: Array<object>; };
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesAuthmethodsV1AuthMethod interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesAuthmethodsV1AuthMethod(value: object): value is ControllerApiResourcesAuthmethodsV1AuthMethod {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAuthmethodsV1AuthMethodFromJSON(json: any): ControllerApiResourcesAuthmethodsV1AuthMethod {
|
||||
return ControllerApiResourcesAuthmethodsV1AuthMethodFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAuthmethodsV1AuthMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesAuthmethodsV1AuthMethod {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'isPrimary': json['is_primary'] == null ? undefined : json['is_primary'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
'authorizedCollectionActions': json['authorized_collection_actions'] == null ? undefined : json['authorized_collection_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAuthmethodsV1AuthMethodToJSON(json: any): ControllerApiResourcesAuthmethodsV1AuthMethod {
|
||||
return ControllerApiResourcesAuthmethodsV1AuthMethodToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAuthmethodsV1AuthMethodToJSONTyped(value?: Omit<ControllerApiResourcesAuthmethodsV1AuthMethod, 'id'|'created_time'|'updated_time'|'is_primary'|'authorized_actions'|'authorized_collection_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
export interface ControllerApiResourcesAuthtokensV1AuthToken {
|
||||
/**
|
||||
* Output only. The ID of the Auth Token.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The Scope in which this Auth Token was generated.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Output only. The token value, which will only be populated after authentication and is only ever visible to the end user whose login request resulted in this Auth Token being created.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
readonly token?: string;
|
||||
/**
|
||||
* Output only. The ID of the User associated with this Auth Token.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
readonly userId?: string;
|
||||
/**
|
||||
* Output only. The ID of the Auth Method associated with this Auth Token.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
readonly authMethodId?: string;
|
||||
/**
|
||||
* Output only. The ID of the Account associated with this Auth Token.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
readonly accountId?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Output only. The approximate time this Auth Token was last used.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
readonly approximateLastUsedTime?: Date;
|
||||
/**
|
||||
* Output only. The time this Auth Token expires.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
readonly expirationTime?: Date;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesAuthtokensV1AuthToken
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesAuthtokensV1AuthToken interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesAuthtokensV1AuthToken(value: object): value is ControllerApiResourcesAuthtokensV1AuthToken {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAuthtokensV1AuthTokenFromJSON(json: any): ControllerApiResourcesAuthtokensV1AuthToken {
|
||||
return ControllerApiResourcesAuthtokensV1AuthTokenFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAuthtokensV1AuthTokenFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesAuthtokensV1AuthToken {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'token': json['token'] == null ? undefined : json['token'],
|
||||
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
||||
'authMethodId': json['auth_method_id'] == null ? undefined : json['auth_method_id'],
|
||||
'accountId': json['account_id'] == null ? undefined : json['account_id'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'approximateLastUsedTime': json['approximate_last_used_time'] == null ? undefined : (new Date(json['approximate_last_used_time'])),
|
||||
'expirationTime': json['expiration_time'] == null ? undefined : (new Date(json['expiration_time'])),
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAuthtokensV1AuthTokenToJSON(json: any): ControllerApiResourcesAuthtokensV1AuthToken {
|
||||
return ControllerApiResourcesAuthtokensV1AuthTokenToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesAuthtokensV1AuthTokenToJSONTyped(value?: Omit<ControllerApiResourcesAuthtokensV1AuthToken, 'id'|'token'|'user_id'|'auth_method_id'|'account_id'|'created_time'|'updated_time'|'approximate_last_used_time'|'expiration_time'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesBillingV1ActiveUsers
|
||||
*/
|
||||
export interface ControllerApiResourcesBillingV1ActiveUsers {
|
||||
/**
|
||||
* Output only. The number of active users between the start time and end time.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesBillingV1ActiveUsers
|
||||
*/
|
||||
readonly count?: number;
|
||||
/**
|
||||
* Output only. The start time of the active users count, inclusive.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesBillingV1ActiveUsers
|
||||
*/
|
||||
readonly startTime?: Date;
|
||||
/**
|
||||
* Output only. The end time of the active users count, exclusive.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesBillingV1ActiveUsers
|
||||
*/
|
||||
readonly endTime?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesBillingV1ActiveUsers interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesBillingV1ActiveUsers(value: object): value is ControllerApiResourcesBillingV1ActiveUsers {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesBillingV1ActiveUsersFromJSON(json: any): ControllerApiResourcesBillingV1ActiveUsers {
|
||||
return ControllerApiResourcesBillingV1ActiveUsersFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesBillingV1ActiveUsersFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesBillingV1ActiveUsers {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'count': json['count'] == null ? undefined : json['count'],
|
||||
'startTime': json['start_time'] == null ? undefined : (new Date(json['start_time'])),
|
||||
'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesBillingV1ActiveUsersToJSON(json: any): ControllerApiResourcesBillingV1ActiveUsers {
|
||||
return ControllerApiResourcesBillingV1ActiveUsersToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesBillingV1ActiveUsersToJSONTyped(value?: Omit<ControllerApiResourcesBillingV1ActiveUsers, 'count'|'start_time'|'end_time'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
export interface ControllerApiResourcesCredentiallibrariesV1CredentialLibrary {
|
||||
/**
|
||||
* Output only. The ID of the Credential Library.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the Credential Store of which this Credential Library is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
credentialStoreId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The Credential Library type.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific Credential Library type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
credentialType?: string;
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesCredentiallibrariesV1CredentialLibrary
|
||||
*/
|
||||
credentialMappingOverrides?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesCredentiallibrariesV1CredentialLibrary interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesCredentiallibrariesV1CredentialLibrary(value: object): value is ControllerApiResourcesCredentiallibrariesV1CredentialLibrary {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSON(json: any): ControllerApiResourcesCredentiallibrariesV1CredentialLibrary {
|
||||
return ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentiallibrariesV1CredentialLibraryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesCredentiallibrariesV1CredentialLibrary {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'credentialStoreId': json['credential_store_id'] == null ? undefined : json['credential_store_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
'credentialType': json['credential_type'] == null ? undefined : json['credential_type'],
|
||||
'credentialMappingOverrides': json['credential_mapping_overrides'] == null ? undefined : json['credential_mapping_overrides'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSON(json: any): ControllerApiResourcesCredentiallibrariesV1CredentialLibrary {
|
||||
return ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentiallibrariesV1CredentialLibraryToJSONTyped(value?: Omit<ControllerApiResourcesCredentiallibrariesV1CredentialLibrary, 'id'|'created_time'|'updated_time'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'credential_store_id': value['credentialStoreId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
'credential_type': value['credentialType'],
|
||||
'credential_mapping_overrides': value['credentialMappingOverrides'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,150 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
export interface ControllerApiResourcesCredentialsV1Credential {
|
||||
/**
|
||||
* Output only. The ID of the Credential.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the Credential Store of which this Credential is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
credentialStoreId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The Credential type.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific Credential type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesCredentialsV1Credential
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesCredentialsV1Credential interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesCredentialsV1Credential(value: object): value is ControllerApiResourcesCredentialsV1Credential {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentialsV1CredentialFromJSON(json: any): ControllerApiResourcesCredentialsV1Credential {
|
||||
return ControllerApiResourcesCredentialsV1CredentialFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentialsV1CredentialFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesCredentialsV1Credential {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'credentialStoreId': json['credential_store_id'] == null ? undefined : json['credential_store_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentialsV1CredentialToJSON(json: any): ControllerApiResourcesCredentialsV1Credential {
|
||||
return ControllerApiResourcesCredentialsV1CredentialToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentialsV1CredentialToJSONTyped(value?: Omit<ControllerApiResourcesCredentialsV1Credential, 'id'|'created_time'|'updated_time'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'credential_store_id': value['credentialStoreId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
+157
@@ -0,0 +1,157 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
export interface ControllerApiResourcesCredentialstoresV1CredentialStore {
|
||||
/**
|
||||
* Output only. The ID of the Credential Store.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the Scope of which this Credential Store is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The Credential Store type.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific Credential Store type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
/**
|
||||
* Output only. The authorized actions for the scope's collections.
|
||||
* @type {{ [key: string]: Array<object>; }}
|
||||
* @memberof ControllerApiResourcesCredentialstoresV1CredentialStore
|
||||
*/
|
||||
readonly authorizedCollectionActions?: { [key: string]: Array<object>; };
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesCredentialstoresV1CredentialStore interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesCredentialstoresV1CredentialStore(value: object): value is ControllerApiResourcesCredentialstoresV1CredentialStore {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSON(json: any): ControllerApiResourcesCredentialstoresV1CredentialStore {
|
||||
return ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentialstoresV1CredentialStoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesCredentialstoresV1CredentialStore {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
'authorizedCollectionActions': json['authorized_collection_actions'] == null ? undefined : json['authorized_collection_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentialstoresV1CredentialStoreToJSON(json: any): ControllerApiResourcesCredentialstoresV1CredentialStore {
|
||||
return ControllerApiResourcesCredentialstoresV1CredentialStoreToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesCredentialstoresV1CredentialStoreToJSONTyped(value?: Omit<ControllerApiResourcesCredentialstoresV1CredentialStore, 'id'|'created_time'|'updated_time'|'authorized_actions'|'authorized_collection_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,155 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import type { ControllerApiResourcesGroupsV1Member } from './ControllerApiResourcesGroupsV1Member';
|
||||
import {
|
||||
ControllerApiResourcesGroupsV1MemberFromJSON,
|
||||
ControllerApiResourcesGroupsV1MemberFromJSONTyped,
|
||||
ControllerApiResourcesGroupsV1MemberToJSON,
|
||||
ControllerApiResourcesGroupsV1MemberToJSONTyped,
|
||||
} from './ControllerApiResourcesGroupsV1Member';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
export interface ControllerApiResourcesGroupsV1Group {
|
||||
/**
|
||||
* Output only. The ID of the Group.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the scope of which this Group is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set descripton for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* Output only. Contains the list of member IDs in this Group.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
readonly memberIds?: Array<string>;
|
||||
/**
|
||||
* Output only. The members of this Group.
|
||||
* @type {Array<ControllerApiResourcesGroupsV1Member>}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
readonly members?: Array<ControllerApiResourcesGroupsV1Member>;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesGroupsV1Group
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesGroupsV1Group interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesGroupsV1Group(value: object): value is ControllerApiResourcesGroupsV1Group {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesGroupsV1GroupFromJSON(json: any): ControllerApiResourcesGroupsV1Group {
|
||||
return ControllerApiResourcesGroupsV1GroupFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesGroupsV1GroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesGroupsV1Group {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'memberIds': json['member_ids'] == null ? undefined : json['member_ids'],
|
||||
'members': json['members'] == null ? undefined : ((json['members'] as Array<any>).map(ControllerApiResourcesGroupsV1MemberFromJSON)),
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesGroupsV1GroupToJSON(json: any): ControllerApiResourcesGroupsV1Group {
|
||||
return ControllerApiResourcesGroupsV1GroupToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesGroupsV1GroupToJSONTyped(value?: Omit<ControllerApiResourcesGroupsV1Group, 'id'|'created_time'|'updated_time'|'member_ids'|'members'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesGroupsV1Member
|
||||
*/
|
||||
export interface ControllerApiResourcesGroupsV1Member {
|
||||
/**
|
||||
* Output only. The ID of the member.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesGroupsV1Member
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* Output only. The Scope ID of the member.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesGroupsV1Member
|
||||
*/
|
||||
readonly scopeId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesGroupsV1Member interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesGroupsV1Member(value: object): value is ControllerApiResourcesGroupsV1Member {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesGroupsV1MemberFromJSON(json: any): ControllerApiResourcesGroupsV1Member {
|
||||
return ControllerApiResourcesGroupsV1MemberFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesGroupsV1MemberFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesGroupsV1Member {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesGroupsV1MemberToJSON(json: any): ControllerApiResourcesGroupsV1Member {
|
||||
return ControllerApiResourcesGroupsV1MemberToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesGroupsV1MemberToJSONTyped(value?: Omit<ControllerApiResourcesGroupsV1Member, 'id'|'scope_id'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,203 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesPluginsV1PluginInfo } from './ControllerApiResourcesPluginsV1PluginInfo';
|
||||
import {
|
||||
ControllerApiResourcesPluginsV1PluginInfoFromJSON,
|
||||
ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped,
|
||||
ControllerApiResourcesPluginsV1PluginInfoToJSON,
|
||||
ControllerApiResourcesPluginsV1PluginInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesPluginsV1PluginInfo';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
export interface ControllerApiResourcesHostcatalogsV1HostCatalog {
|
||||
/**
|
||||
* Output only. The ID of the host.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the Scope of which this Host Catalog is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* The ID of the plugin of which this catalog is created.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
pluginId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesPluginsV1PluginInfo}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
plugin?: ControllerApiResourcesPluginsV1PluginInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The type of Host Catalog.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* Attributes specific to the catalog type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Secrets specific to the catalog type. These are never output.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
secrets?: object;
|
||||
/**
|
||||
* Output only. The HMAC of the last secrets supplied via the API, if any.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
readonly secretsHmac?: string;
|
||||
/**
|
||||
* Optional worker filter for plugin-subtype host catalogs. Boundary Enterprise only.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
workerFilter?: string;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
/**
|
||||
* Output only. The authorized actions for the scope's collections.
|
||||
* @type {{ [key: string]: Array<object>; }}
|
||||
* @memberof ControllerApiResourcesHostcatalogsV1HostCatalog
|
||||
*/
|
||||
readonly authorizedCollectionActions?: { [key: string]: Array<object>; };
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesHostcatalogsV1HostCatalog interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesHostcatalogsV1HostCatalog(value: object): value is ControllerApiResourcesHostcatalogsV1HostCatalog {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostcatalogsV1HostCatalogFromJSON(json: any): ControllerApiResourcesHostcatalogsV1HostCatalog {
|
||||
return ControllerApiResourcesHostcatalogsV1HostCatalogFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostcatalogsV1HostCatalogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesHostcatalogsV1HostCatalog {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'pluginId': json['plugin_id'] == null ? undefined : json['plugin_id'],
|
||||
'plugin': json['plugin'] == null ? undefined : ControllerApiResourcesPluginsV1PluginInfoFromJSON(json['plugin']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'secrets': json['secrets'] == null ? undefined : json['secrets'],
|
||||
'secretsHmac': json['secrets_hmac'] == null ? undefined : json['secrets_hmac'],
|
||||
'workerFilter': json['worker_filter'] == null ? undefined : json['worker_filter'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
'authorizedCollectionActions': json['authorized_collection_actions'] == null ? undefined : json['authorized_collection_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostcatalogsV1HostCatalogToJSON(json: any): ControllerApiResourcesHostcatalogsV1HostCatalog {
|
||||
return ControllerApiResourcesHostcatalogsV1HostCatalogToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostcatalogsV1HostCatalogToJSONTyped(value?: Omit<ControllerApiResourcesHostcatalogsV1HostCatalog, 'id'|'created_time'|'updated_time'|'secrets_hmac'|'authorized_actions'|'authorized_collection_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'plugin_id': value['pluginId'],
|
||||
'plugin': ControllerApiResourcesPluginsV1PluginInfoToJSON(value['plugin']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
'secrets': value['secrets'],
|
||||
'worker_filter': value['workerFilter'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,200 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesPluginsV1PluginInfo } from './ControllerApiResourcesPluginsV1PluginInfo';
|
||||
import {
|
||||
ControllerApiResourcesPluginsV1PluginInfoFromJSON,
|
||||
ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped,
|
||||
ControllerApiResourcesPluginsV1PluginInfoToJSON,
|
||||
ControllerApiResourcesPluginsV1PluginInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesPluginsV1PluginInfo';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
export interface ControllerApiResourcesHostsV1Host {
|
||||
/**
|
||||
* Output only. The ID of the Host.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The Host Catalog of which this Host is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
hostCatalogId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesPluginsV1PluginInfo}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
plugin?: ControllerApiResourcesPluginsV1PluginInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The type of the resource.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* Output only. A list of Host Sets containing this Host.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
readonly hostSetIds?: Array<string>;
|
||||
/**
|
||||
* The attributes that are applicable to the specific Host type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Output only. The list of ip addresses associated with this host.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
readonly ipAddresses?: Array<string>;
|
||||
/**
|
||||
* Output only. The list of dns addresses associated with this host.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
readonly dnsNames?: Array<string>;
|
||||
/**
|
||||
* Output only. The external ID of the host, if any.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
readonly externalId?: string;
|
||||
/**
|
||||
* Output only. Refers to the name for a given host provided by the plugin enabled backing service.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
readonly externalName?: string;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesHostsV1Host
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesHostsV1Host interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesHostsV1Host(value: object): value is ControllerApiResourcesHostsV1Host {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostsV1HostFromJSON(json: any): ControllerApiResourcesHostsV1Host {
|
||||
return ControllerApiResourcesHostsV1HostFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostsV1HostFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesHostsV1Host {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'hostCatalogId': json['host_catalog_id'] == null ? undefined : json['host_catalog_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'plugin': json['plugin'] == null ? undefined : ControllerApiResourcesPluginsV1PluginInfoFromJSON(json['plugin']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'hostSetIds': json['host_set_ids'] == null ? undefined : json['host_set_ids'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'ipAddresses': json['ip_addresses'] == null ? undefined : json['ip_addresses'],
|
||||
'dnsNames': json['dns_names'] == null ? undefined : json['dns_names'],
|
||||
'externalId': json['external_id'] == null ? undefined : json['external_id'],
|
||||
'externalName': json['external_name'] == null ? undefined : json['external_name'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostsV1HostToJSON(json: any): ControllerApiResourcesHostsV1Host {
|
||||
return ControllerApiResourcesHostsV1HostToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostsV1HostToJSONTyped(value?: Omit<ControllerApiResourcesHostsV1Host, 'id'|'created_time'|'updated_time'|'host_set_ids'|'ip_addresses'|'dns_names'|'external_id'|'external_name'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'host_catalog_id': value['hostCatalogId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'plugin': ControllerApiResourcesPluginsV1PluginInfoToJSON(value['plugin']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,198 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesPluginsV1PluginInfo } from './ControllerApiResourcesPluginsV1PluginInfo';
|
||||
import {
|
||||
ControllerApiResourcesPluginsV1PluginInfoFromJSON,
|
||||
ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped,
|
||||
ControllerApiResourcesPluginsV1PluginInfoToJSON,
|
||||
ControllerApiResourcesPluginsV1PluginInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesPluginsV1PluginInfo';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
export interface ControllerApiResourcesHostsetsV1HostSet {
|
||||
/**
|
||||
* Output only. The ID of the Host Set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The Host Catalog of which this Host Set is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
hostCatalogId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesPluginsV1PluginInfo}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
plugin?: ControllerApiResourcesPluginsV1PluginInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The type of the Host Set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* Output only. A list of Hosts in this Host Set.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
readonly hostIds?: Array<string>;
|
||||
/**
|
||||
* multiple possible endpoints for a host. Preferences are specified by
|
||||
* "cidr:<valid IPv4/6 CIDR>" or "dns:<globbed name>", specifying which IP
|
||||
* address or DNS name out of a host's available possibilities should be
|
||||
* preferred. If no preferences are specified, a value will be chosen from
|
||||
* among all avialable values using a built-in priority order. May not be
|
||||
* valid for all plugin types.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
preferredEndpoints?: Array<string>;
|
||||
/**
|
||||
* An interger number of seconds indicating the amount of time that should
|
||||
* elapse between syncs of the host set. The interval will be applied to the
|
||||
* end of the previous sync operation, not the start. Setting to -1 will
|
||||
* disable syncing for that host set; setting to zero will cause the set to
|
||||
* use Boundary's default. The default may change between releases. May not
|
||||
* be valid for all plugin types.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
syncIntervalSeconds?: number;
|
||||
/**
|
||||
* The attributes that are applicable for the specific Host Set type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesHostsetsV1HostSet
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesHostsetsV1HostSet interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesHostsetsV1HostSet(value: object): value is ControllerApiResourcesHostsetsV1HostSet {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostsetsV1HostSetFromJSON(json: any): ControllerApiResourcesHostsetsV1HostSet {
|
||||
return ControllerApiResourcesHostsetsV1HostSetFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostsetsV1HostSetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesHostsetsV1HostSet {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'hostCatalogId': json['host_catalog_id'] == null ? undefined : json['host_catalog_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'plugin': json['plugin'] == null ? undefined : ControllerApiResourcesPluginsV1PluginInfoFromJSON(json['plugin']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'hostIds': json['host_ids'] == null ? undefined : json['host_ids'],
|
||||
'preferredEndpoints': json['preferred_endpoints'] == null ? undefined : json['preferred_endpoints'],
|
||||
'syncIntervalSeconds': json['sync_interval_seconds'] == null ? undefined : json['sync_interval_seconds'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostsetsV1HostSetToJSON(json: any): ControllerApiResourcesHostsetsV1HostSet {
|
||||
return ControllerApiResourcesHostsetsV1HostSetToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesHostsetsV1HostSetToJSONTyped(value?: Omit<ControllerApiResourcesHostsetsV1HostSet, 'id'|'created_time'|'updated_time'|'host_ids'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'host_catalog_id': value['hostCatalogId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'plugin': ControllerApiResourcesPluginsV1PluginInfoToJSON(value['plugin']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'preferred_endpoints': value['preferredEndpoints'],
|
||||
'sync_interval_seconds': value['syncIntervalSeconds'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
export interface ControllerApiResourcesManagedgroupsV1ManagedGroup {
|
||||
/**
|
||||
* Output only. The ID of the ManagedGroup.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The type of this ManagedGroup.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The ID of the Auth Method that is associated with this ManagedGroup.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
authMethodId?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific ManagedGroup type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Output only. The IDs of the current set of members (accounts) that are associated with this ManagedGroup.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
readonly memberIds?: Array<string>;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesManagedgroupsV1ManagedGroup
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesManagedgroupsV1ManagedGroup interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesManagedgroupsV1ManagedGroup(value: object): value is ControllerApiResourcesManagedgroupsV1ManagedGroup {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSON(json: any): ControllerApiResourcesManagedgroupsV1ManagedGroup {
|
||||
return ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesManagedgroupsV1ManagedGroupFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesManagedgroupsV1ManagedGroup {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'authMethodId': json['auth_method_id'] == null ? undefined : json['auth_method_id'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'memberIds': json['member_ids'] == null ? undefined : json['member_ids'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesManagedgroupsV1ManagedGroupToJSON(json: any): ControllerApiResourcesManagedgroupsV1ManagedGroup {
|
||||
return ControllerApiResourcesManagedgroupsV1ManagedGroupToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesManagedgroupsV1ManagedGroupToJSONTyped(value?: Omit<ControllerApiResourcesManagedgroupsV1ManagedGroup, 'id'|'created_time'|'updated_time'|'member_ids'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'auth_method_id': value['authMethodId'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesPluginsV1PluginInfo
|
||||
*/
|
||||
export interface ControllerApiResourcesPluginsV1PluginInfo {
|
||||
/**
|
||||
* Output only. The ID of the Plugin.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesPluginsV1PluginInfo
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* Output only. The name of the plugin resource in boundary, if any.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesPluginsV1PluginInfo
|
||||
*/
|
||||
readonly name?: string;
|
||||
/**
|
||||
* Output only. The description of the plugin in boundary, if any.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesPluginsV1PluginInfo
|
||||
*/
|
||||
readonly description?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesPluginsV1PluginInfo interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesPluginsV1PluginInfo(value: object): value is ControllerApiResourcesPluginsV1PluginInfo {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesPluginsV1PluginInfoFromJSON(json: any): ControllerApiResourcesPluginsV1PluginInfo {
|
||||
return ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesPluginsV1PluginInfo {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesPluginsV1PluginInfoToJSON(json: any): ControllerApiResourcesPluginsV1PluginInfo {
|
||||
return ControllerApiResourcesPluginsV1PluginInfoToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesPluginsV1PluginInfoToJSONTyped(value?: Omit<ControllerApiResourcesPluginsV1PluginInfo, 'id'|'name'|'description'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
export interface ControllerApiResourcesPoliciesV1Policy {
|
||||
/**
|
||||
* Output only. The id of the storage policy.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The scope id of this policy. This must be defined for policy creation, but
|
||||
* is otherwise output only.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* The policy's type.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure
|
||||
* this resource has not changed. The mutation will fail if the version does
|
||||
* not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
*
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesPoliciesV1Policy
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesPoliciesV1Policy interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesPoliciesV1Policy(value: object): value is ControllerApiResourcesPoliciesV1Policy {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesPoliciesV1PolicyFromJSON(json: any): ControllerApiResourcesPoliciesV1Policy {
|
||||
return ControllerApiResourcesPoliciesV1PolicyFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesPoliciesV1PolicyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesPoliciesV1Policy {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesPoliciesV1PolicyToJSON(json: any): ControllerApiResourcesPoliciesV1Policy {
|
||||
return ControllerApiResourcesPoliciesV1PolicyToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesPoliciesV1PolicyToJSONTyped(value?: Omit<ControllerApiResourcesPoliciesV1Policy, 'id'|'created_time'|'updated_time'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'type': value['type'],
|
||||
'version': value['version'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesRolesV1GrantJson } from './ControllerApiResourcesRolesV1GrantJson';
|
||||
import {
|
||||
ControllerApiResourcesRolesV1GrantJsonFromJSON,
|
||||
ControllerApiResourcesRolesV1GrantJsonFromJSONTyped,
|
||||
ControllerApiResourcesRolesV1GrantJsonToJSON,
|
||||
ControllerApiResourcesRolesV1GrantJsonToJSONTyped,
|
||||
} from './ControllerApiResourcesRolesV1GrantJson';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesRolesV1Grant
|
||||
*/
|
||||
export interface ControllerApiResourcesRolesV1Grant {
|
||||
/**
|
||||
* Output only. The original user-supplied string.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1Grant
|
||||
*/
|
||||
readonly raw?: string;
|
||||
/**
|
||||
* Output only. The canonically-formatted string.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1Grant
|
||||
*/
|
||||
readonly canonical?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesRolesV1GrantJson}
|
||||
* @memberof ControllerApiResourcesRolesV1Grant
|
||||
*/
|
||||
json?: ControllerApiResourcesRolesV1GrantJson;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesRolesV1Grant interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesRolesV1Grant(value: object): value is ControllerApiResourcesRolesV1Grant {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1GrantFromJSON(json: any): ControllerApiResourcesRolesV1Grant {
|
||||
return ControllerApiResourcesRolesV1GrantFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1GrantFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesRolesV1Grant {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'raw': json['raw'] == null ? undefined : json['raw'],
|
||||
'canonical': json['canonical'] == null ? undefined : json['canonical'],
|
||||
'json': json['json'] == null ? undefined : ControllerApiResourcesRolesV1GrantJsonFromJSON(json['json']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1GrantToJSON(json: any): ControllerApiResourcesRolesV1Grant {
|
||||
return ControllerApiResourcesRolesV1GrantToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1GrantToJSONTyped(value?: Omit<ControllerApiResourcesRolesV1Grant, 'raw'|'canonical'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'json': ControllerApiResourcesRolesV1GrantJsonToJSON(value['json']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesRolesV1GrantJson
|
||||
*/
|
||||
export interface ControllerApiResourcesRolesV1GrantJson {
|
||||
/**
|
||||
* Output only. The ID, if set.
|
||||
* Deprecated: use "ids" instead.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1GrantJson
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* Output only. The IDs, if set.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesRolesV1GrantJson
|
||||
*/
|
||||
readonly ids?: Array<string>;
|
||||
/**
|
||||
* Output only. The type, if set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1GrantJson
|
||||
*/
|
||||
readonly type?: string;
|
||||
/**
|
||||
* Output only. The actions.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesRolesV1GrantJson
|
||||
*/
|
||||
readonly actions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesRolesV1GrantJson interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesRolesV1GrantJson(value: object): value is ControllerApiResourcesRolesV1GrantJson {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1GrantJsonFromJSON(json: any): ControllerApiResourcesRolesV1GrantJson {
|
||||
return ControllerApiResourcesRolesV1GrantJsonFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1GrantJsonFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesRolesV1GrantJson {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'ids': json['ids'] == null ? undefined : json['ids'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'actions': json['actions'] == null ? undefined : json['actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1GrantJsonToJSON(json: any): ControllerApiResourcesRolesV1GrantJson {
|
||||
return ControllerApiResourcesRolesV1GrantJsonToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1GrantJsonToJSONTyped(value?: Omit<ControllerApiResourcesRolesV1GrantJson, 'id'|'ids'|'type'|'actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesRolesV1Principal
|
||||
*/
|
||||
export interface ControllerApiResourcesRolesV1Principal {
|
||||
/**
|
||||
* Output only. The ID of the principal.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1Principal
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* Output only. The type of the principal.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1Principal
|
||||
*/
|
||||
readonly type?: string;
|
||||
/**
|
||||
* Output only. The Scope of the principal.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1Principal
|
||||
*/
|
||||
readonly scopeId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesRolesV1Principal interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesRolesV1Principal(value: object): value is ControllerApiResourcesRolesV1Principal {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1PrincipalFromJSON(json: any): ControllerApiResourcesRolesV1Principal {
|
||||
return ControllerApiResourcesRolesV1PrincipalFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1PrincipalFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesRolesV1Principal {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1PrincipalToJSON(json: any): ControllerApiResourcesRolesV1Principal {
|
||||
return ControllerApiResourcesRolesV1PrincipalToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1PrincipalToJSONTyped(value?: Omit<ControllerApiResourcesRolesV1Principal, 'id'|'type'|'scope_id'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesRolesV1Principal } from './ControllerApiResourcesRolesV1Principal';
|
||||
import {
|
||||
ControllerApiResourcesRolesV1PrincipalFromJSON,
|
||||
ControllerApiResourcesRolesV1PrincipalFromJSONTyped,
|
||||
ControllerApiResourcesRolesV1PrincipalToJSON,
|
||||
ControllerApiResourcesRolesV1PrincipalToJSONTyped,
|
||||
} from './ControllerApiResourcesRolesV1Principal';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import type { ControllerApiResourcesRolesV1Grant } from './ControllerApiResourcesRolesV1Grant';
|
||||
import {
|
||||
ControllerApiResourcesRolesV1GrantFromJSON,
|
||||
ControllerApiResourcesRolesV1GrantFromJSONTyped,
|
||||
ControllerApiResourcesRolesV1GrantToJSON,
|
||||
ControllerApiResourcesRolesV1GrantToJSONTyped,
|
||||
} from './ControllerApiResourcesRolesV1Grant';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
export interface ControllerApiResourcesRolesV1Role {
|
||||
/**
|
||||
* Output only. The ID of the Role.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the Scope containing this Role.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* Output only. The IDs of Scopes the grants will apply to. This can include
|
||||
* the role's own scope ID, or "this" for the same behavior; specific IDs of
|
||||
* scopes that are children of the role's scope; the value "children" to match
|
||||
* all direct child scopes of the role's scope; or the value "descendants" to
|
||||
* match all descendant scopes (e.g. child scopes, children of child scopes;
|
||||
* only valid at "global" scope since it is the only one with children of
|
||||
* children).
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
readonly grantScopeIds?: Array<string>;
|
||||
/**
|
||||
* Output only. The IDs (only) of principals that are assigned to this role.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
readonly principalIds?: Array<string>;
|
||||
/**
|
||||
* Output only. The principals that are assigned to this role.
|
||||
* @type {Array<ControllerApiResourcesRolesV1Principal>}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
readonly principals?: Array<ControllerApiResourcesRolesV1Principal>;
|
||||
/**
|
||||
* Output only. The grants that this role provides for its principals.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
readonly grantStrings?: Array<string>;
|
||||
/**
|
||||
* Output only. The parsed grant information.
|
||||
* @type {Array<ControllerApiResourcesRolesV1Grant>}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
readonly grants?: Array<ControllerApiResourcesRolesV1Grant>;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesRolesV1Role
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesRolesV1Role interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesRolesV1Role(value: object): value is ControllerApiResourcesRolesV1Role {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1RoleFromJSON(json: any): ControllerApiResourcesRolesV1Role {
|
||||
return ControllerApiResourcesRolesV1RoleFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1RoleFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesRolesV1Role {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'grantScopeIds': json['grant_scope_ids'] == null ? undefined : json['grant_scope_ids'],
|
||||
'principalIds': json['principal_ids'] == null ? undefined : json['principal_ids'],
|
||||
'principals': json['principals'] == null ? undefined : ((json['principals'] as Array<any>).map(ControllerApiResourcesRolesV1PrincipalFromJSON)),
|
||||
'grantStrings': json['grant_strings'] == null ? undefined : json['grant_strings'],
|
||||
'grants': json['grants'] == null ? undefined : ((json['grants'] as Array<any>).map(ControllerApiResourcesRolesV1GrantFromJSON)),
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1RoleToJSON(json: any): ControllerApiResourcesRolesV1Role {
|
||||
return ControllerApiResourcesRolesV1RoleToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesRolesV1RoleToJSONTyped(value?: Omit<ControllerApiResourcesRolesV1Role, 'id'|'created_time'|'updated_time'|'grant_scope_ids'|'principal_ids'|'principals'|'grant_strings'|'grants'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,120 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import type { ControllerApiResourcesScopesV1KeyVersion } from './ControllerApiResourcesScopesV1KeyVersion';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1KeyVersionFromJSON,
|
||||
ControllerApiResourcesScopesV1KeyVersionFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1KeyVersionToJSON,
|
||||
ControllerApiResourcesScopesV1KeyVersionToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1KeyVersion';
|
||||
|
||||
/**
|
||||
* Key contains all fields related to a Key in a Scope.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesScopesV1Key
|
||||
*/
|
||||
export interface ControllerApiResourcesScopesV1Key {
|
||||
/**
|
||||
* The ID of the Key.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1Key
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesScopesV1Key
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* The purpose of the Key.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1Key
|
||||
*/
|
||||
purpose?: string;
|
||||
/**
|
||||
* The time this Key was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesScopesV1Key
|
||||
*/
|
||||
createdTime?: Date;
|
||||
/**
|
||||
* The type of the Key.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1Key
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The versions of the key.
|
||||
* @type {Array<ControllerApiResourcesScopesV1KeyVersion>}
|
||||
* @memberof ControllerApiResourcesScopesV1Key
|
||||
*/
|
||||
versions?: Array<ControllerApiResourcesScopesV1KeyVersion>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesScopesV1Key interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesScopesV1Key(value: object): value is ControllerApiResourcesScopesV1Key {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyFromJSON(json: any): ControllerApiResourcesScopesV1Key {
|
||||
return ControllerApiResourcesScopesV1KeyFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesScopesV1Key {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'purpose': json['purpose'] == null ? undefined : json['purpose'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'versions': json['versions'] == null ? undefined : ((json['versions'] as Array<any>).map(ControllerApiResourcesScopesV1KeyVersionFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyToJSON(json: any): ControllerApiResourcesScopesV1Key {
|
||||
return ControllerApiResourcesScopesV1KeyToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyToJSONTyped(value?: ControllerApiResourcesScopesV1Key | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'purpose': value['purpose'],
|
||||
'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()),
|
||||
'type': value['type'],
|
||||
'versions': value['versions'] == null ? undefined : ((value['versions'] as Array<any>).map(ControllerApiResourcesScopesV1KeyVersionToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesScopesV1KeyVersion
|
||||
*/
|
||||
export interface ControllerApiResourcesScopesV1KeyVersion {
|
||||
/**
|
||||
* The ID of the key version.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1KeyVersion
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The iteration of the Key that this version represents.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesScopesV1KeyVersion
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* When this version was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesScopesV1KeyVersion
|
||||
*/
|
||||
createdTime?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesScopesV1KeyVersion interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesScopesV1KeyVersion(value: object): value is ControllerApiResourcesScopesV1KeyVersion {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyVersionFromJSON(json: any): ControllerApiResourcesScopesV1KeyVersion {
|
||||
return ControllerApiResourcesScopesV1KeyVersionFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyVersionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesScopesV1KeyVersion {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyVersionToJSON(json: any): ControllerApiResourcesScopesV1KeyVersion {
|
||||
return ControllerApiResourcesScopesV1KeyVersionToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyVersionToJSONTyped(value?: ControllerApiResourcesScopesV1KeyVersion | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'version': value['version'],
|
||||
'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()),
|
||||
};
|
||||
}
|
||||
|
||||
+114
@@ -0,0 +1,114 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
* KeyVersionDestructionJob holds information about a pending key version destruction job.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesScopesV1KeyVersionDestructionJob
|
||||
*/
|
||||
export interface ControllerApiResourcesScopesV1KeyVersionDestructionJob {
|
||||
/**
|
||||
* The ID of the Key version this job relates to.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob
|
||||
*/
|
||||
keyVersionId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* The current status of the key version destruction job. One of "pending", "running" or "completed".
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob
|
||||
*/
|
||||
status?: string;
|
||||
/**
|
||||
* The time this key version destruction job was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob
|
||||
*/
|
||||
createdTime?: Date;
|
||||
/**
|
||||
* The number of rows that have been successfully re-encrypted with a new key version.
|
||||
* All rows must be re-encrypted before the key version can be destroyed.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob
|
||||
*/
|
||||
completedCount?: string;
|
||||
/**
|
||||
* The total number of rows that need re-encrypting.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1KeyVersionDestructionJob
|
||||
*/
|
||||
totalCount?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesScopesV1KeyVersionDestructionJob interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesScopesV1KeyVersionDestructionJob(value: object): value is ControllerApiResourcesScopesV1KeyVersionDestructionJob {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyVersionDestructionJobFromJSON(json: any): ControllerApiResourcesScopesV1KeyVersionDestructionJob {
|
||||
return ControllerApiResourcesScopesV1KeyVersionDestructionJobFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyVersionDestructionJobFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesScopesV1KeyVersionDestructionJob {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'keyVersionId': json['key_version_id'] == null ? undefined : json['key_version_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'status': json['status'] == null ? undefined : json['status'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'completedCount': json['completed_count'] == null ? undefined : json['completed_count'],
|
||||
'totalCount': json['total_count'] == null ? undefined : json['total_count'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyVersionDestructionJobToJSON(json: any): ControllerApiResourcesScopesV1KeyVersionDestructionJob {
|
||||
return ControllerApiResourcesScopesV1KeyVersionDestructionJobToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1KeyVersionDestructionJobToJSONTyped(value?: ControllerApiResourcesScopesV1KeyVersionDestructionJob | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'key_version_id': value['keyVersionId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'status': value['status'],
|
||||
'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()),
|
||||
'completed_count': value['completedCount'],
|
||||
'total_count': value['totalCount'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,164 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
export interface ControllerApiResourcesScopesV1Scope {
|
||||
/**
|
||||
* The ID of the scope.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the scope this resource is in. If this is the "global" scope this field will be empty.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set descripton for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The type of the resource.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
primaryAuthMethodId?: string;
|
||||
/**
|
||||
* The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
/**
|
||||
* The authorized actions for the scope's collections.
|
||||
* @type {{ [key: string]: Array<object>; }}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
readonly authorizedCollectionActions?: { [key: string]: Array<object>; };
|
||||
/**
|
||||
* The attached storage policy id.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1Scope
|
||||
*/
|
||||
readonly storagePolicyId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesScopesV1Scope interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesScopesV1Scope(value: object): value is ControllerApiResourcesScopesV1Scope {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1ScopeFromJSON(json: any): ControllerApiResourcesScopesV1Scope {
|
||||
return ControllerApiResourcesScopesV1ScopeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1ScopeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesScopesV1Scope {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'primaryAuthMethodId': json['primary_auth_method_id'] == null ? undefined : json['primary_auth_method_id'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
'authorizedCollectionActions': json['authorized_collection_actions'] == null ? undefined : json['authorized_collection_actions'],
|
||||
'storagePolicyId': json['storage_policy_id'] == null ? undefined : json['storage_policy_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1ScopeToJSON(json: any): ControllerApiResourcesScopesV1Scope {
|
||||
return ControllerApiResourcesScopesV1ScopeToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1ScopeToJSONTyped(value?: Omit<ControllerApiResourcesScopesV1Scope, 'id'|'created_time'|'updated_time'|'authorized_actions'|'authorized_collection_actions'|'storage_policy_id'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'primary_auth_method_id': value['primaryAuthMethodId'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,92 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesScopesV1ScopeInfo
|
||||
*/
|
||||
export interface ControllerApiResourcesScopesV1ScopeInfo {
|
||||
/**
|
||||
* The ID of the scope.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1ScopeInfo
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The type of the scope.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1ScopeInfo
|
||||
*/
|
||||
readonly type?: string;
|
||||
/**
|
||||
* The name of the scope, if any.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1ScopeInfo
|
||||
*/
|
||||
readonly name?: string;
|
||||
/**
|
||||
* The description of the scope, if any.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1ScopeInfo
|
||||
*/
|
||||
readonly description?: string;
|
||||
/**
|
||||
* The ID of the parent scope, if any. This field is empty if it is the "global" scope.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesScopesV1ScopeInfo
|
||||
*/
|
||||
readonly parentScopeId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesScopesV1ScopeInfo interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesScopesV1ScopeInfo(value: object): value is ControllerApiResourcesScopesV1ScopeInfo {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1ScopeInfoFromJSON(json: any): ControllerApiResourcesScopesV1ScopeInfo {
|
||||
return ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesScopesV1ScopeInfo {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'parentScopeId': json['parent_scope_id'] == null ? undefined : json['parent_scope_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1ScopeInfoToJSON(json: any): ControllerApiResourcesScopesV1ScopeInfo {
|
||||
return ControllerApiResourcesScopesV1ScopeInfoToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesScopesV1ScopeInfoToJSONTyped(value?: Omit<ControllerApiResourcesScopesV1ScopeInfo, 'id'|'type'|'name'|'description'|'parent_scope_id'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
+132
@@ -0,0 +1,132 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* ChannelRecording contains recorded information about a single Channel within a Connection.
|
||||
* Channels are only present in multiplexed protocols, such as SSH.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1ChannelRecording
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1ChannelRecording {
|
||||
/**
|
||||
* The ID of the Channel recording.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The total number of bytes uploaded from the client in the Channel.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording
|
||||
*/
|
||||
bytesUp?: string;
|
||||
/**
|
||||
* The total number of bytes downloaded to the client in the Channel.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording
|
||||
*/
|
||||
bytesDown?: string;
|
||||
/**
|
||||
* The time the Channel was created in the controller.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording
|
||||
*/
|
||||
createdTime?: Date;
|
||||
/**
|
||||
* The time of the most recent update to the Channel.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording
|
||||
*/
|
||||
updatedTime?: Date;
|
||||
/**
|
||||
* The time the Channel started.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording
|
||||
*/
|
||||
startTime?: Date;
|
||||
/**
|
||||
* The time the Channel ended.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording
|
||||
*/
|
||||
endTime?: Date;
|
||||
/**
|
||||
* The total duration of the Channel.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording
|
||||
*/
|
||||
duration?: string;
|
||||
/**
|
||||
* MimeTypes define the mime types that can
|
||||
* be used to consume the recording of this Channel.
|
||||
* The only supported mime type is "application/x-asciicast".
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ChannelRecording
|
||||
*/
|
||||
mimeTypes?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1ChannelRecording interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1ChannelRecording(value: object): value is ControllerApiResourcesSessionrecordingsV1ChannelRecording {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1ChannelRecording {
|
||||
return ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1ChannelRecording {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'bytesUp': json['bytes_up'] == null ? undefined : json['bytes_up'],
|
||||
'bytesDown': json['bytes_down'] == null ? undefined : json['bytes_down'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'startTime': json['start_time'] == null ? undefined : (new Date(json['start_time'])),
|
||||
'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
|
||||
'duration': json['duration'] == null ? undefined : json['duration'],
|
||||
'mimeTypes': json['mime_types'] == null ? undefined : json['mime_types'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSON(json: any): ControllerApiResourcesSessionrecordingsV1ChannelRecording {
|
||||
return ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1ChannelRecording | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'bytes_up': value['bytesUp'],
|
||||
'bytes_down': value['bytesDown'],
|
||||
'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()),
|
||||
'updated_time': value['updatedTime'] == null ? undefined : ((value['updatedTime']).toISOString()),
|
||||
'start_time': value['startTime'] == null ? undefined : ((value['startTime']).toISOString()),
|
||||
'end_time': value['endTime'] == null ? undefined : ((value['endTime']).toISOString()),
|
||||
'duration': value['duration'],
|
||||
'mime_types': value['mimeTypes'],
|
||||
};
|
||||
}
|
||||
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1ChannelRecording } from './ControllerApiResourcesSessionrecordingsV1ChannelRecording';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1ChannelRecording';
|
||||
|
||||
/**
|
||||
* ConnectionRecording contains the recording of a single Connection within a Session.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1ConnectionRecording {
|
||||
/**
|
||||
* The ID of the Connection recording.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The total number of bytes uploaded from the client in the Connection.
|
||||
* This includes any protocol overhead.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
bytesUp?: string;
|
||||
/**
|
||||
* The total number of bytes downloaded to the client in the Connection.
|
||||
* This includes any protocol overhead.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
bytesDown?: string;
|
||||
/**
|
||||
* The time the Connection was created in the controller.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
createdTime?: Date;
|
||||
/**
|
||||
* The time of the most recent update to the Connection.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
updatedTime?: Date;
|
||||
/**
|
||||
* The time the Connection started.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
startTime?: Date;
|
||||
/**
|
||||
* The time the Connection ended.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
endTime?: Date;
|
||||
/**
|
||||
* The total duration of the Connection.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
duration?: string;
|
||||
/**
|
||||
* MimeTypes define the mime types that can
|
||||
* be used to consume the recording of this Connection.
|
||||
* No mime types are currently supported.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
mimeTypes?: Array<string>;
|
||||
/**
|
||||
* Optionally, the channels used in this Connection,
|
||||
* if it is using a multiplexed protocol, such as SSH.
|
||||
* @type {Array<ControllerApiResourcesSessionrecordingsV1ChannelRecording>}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ConnectionRecording
|
||||
*/
|
||||
channelRecordings?: Array<ControllerApiResourcesSessionrecordingsV1ChannelRecording>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1ConnectionRecording interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1ConnectionRecording(value: object): value is ControllerApiResourcesSessionrecordingsV1ConnectionRecording {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1ConnectionRecording {
|
||||
return ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1ConnectionRecording {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'bytesUp': json['bytes_up'] == null ? undefined : json['bytes_up'],
|
||||
'bytesDown': json['bytes_down'] == null ? undefined : json['bytes_down'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'startTime': json['start_time'] == null ? undefined : (new Date(json['start_time'])),
|
||||
'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
|
||||
'duration': json['duration'] == null ? undefined : json['duration'],
|
||||
'mimeTypes': json['mime_types'] == null ? undefined : json['mime_types'],
|
||||
'channelRecordings': json['channel_recordings'] == null ? undefined : ((json['channel_recordings'] as Array<any>).map(ControllerApiResourcesSessionrecordingsV1ChannelRecordingFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSON(json: any): ControllerApiResourcesSessionrecordingsV1ConnectionRecording {
|
||||
return ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1ConnectionRecording | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'bytes_up': value['bytesUp'],
|
||||
'bytes_down': value['bytesDown'],
|
||||
'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()),
|
||||
'updated_time': value['updatedTime'] == null ? undefined : ((value['updatedTime']).toISOString()),
|
||||
'start_time': value['startTime'] == null ? undefined : ((value['startTime']).toISOString()),
|
||||
'end_time': value['endTime'] == null ? undefined : ((value['endTime']).toISOString()),
|
||||
'duration': value['duration'],
|
||||
'mime_types': value['mimeTypes'],
|
||||
'channel_recordings': value['channelRecordings'] == null ? undefined : ((value['channelRecordings'] as Array<any>).map(ControllerApiResourcesSessionrecordingsV1ChannelRecordingToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1CredentialStore } from './ControllerApiResourcesSessionrecordingsV1CredentialStore';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1CredentialStore';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1Credential
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1Credential {
|
||||
/**
|
||||
* The ID of the Credential.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Credential
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesSessionrecordingsV1CredentialStore}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Credential
|
||||
*/
|
||||
credentialStore?: ControllerApiResourcesSessionrecordingsV1CredentialStore;
|
||||
/**
|
||||
* The name of the credential.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Credential
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Credential
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* The purposes for which this Credential was attached to the sesssion.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Credential
|
||||
*/
|
||||
purposes?: Array<string>;
|
||||
/**
|
||||
* The Credential type.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Credential
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific Credential type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Credential
|
||||
*/
|
||||
attributes?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1Credential interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1Credential(value: object): value is ControllerApiResourcesSessionrecordingsV1Credential {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1Credential {
|
||||
return ControllerApiResourcesSessionrecordingsV1CredentialFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1Credential {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'credentialStore': json['credential_store'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSON(json['credential_store']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'purposes': json['purposes'] == null ? undefined : json['purposes'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialToJSON(json: any): ControllerApiResourcesSessionrecordingsV1Credential {
|
||||
return ControllerApiResourcesSessionrecordingsV1CredentialToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1Credential | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'credential_store': ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSON(value['credentialStore']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'purposes': value['purposes'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
+121
@@ -0,0 +1,121 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1CredentialStore } from './ControllerApiResourcesSessionrecordingsV1CredentialStore';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1CredentialStore';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1CredentialLibrary
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1CredentialLibrary {
|
||||
/**
|
||||
* The ID of the Credential Library.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesSessionrecordingsV1CredentialStore}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary
|
||||
*/
|
||||
credentialStore?: ControllerApiResourcesSessionrecordingsV1CredentialStore;
|
||||
/**
|
||||
* Optional name of this Credential Library.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description of this Credential Library.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* The purposes for which this CredentialLibrary was attached to the sesssion.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary
|
||||
*/
|
||||
purposes?: Array<string>;
|
||||
/**
|
||||
* The Credential Library type.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific Credential Library type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialLibrary
|
||||
*/
|
||||
attributes?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1CredentialLibrary interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1CredentialLibrary(value: object): value is ControllerApiResourcesSessionrecordingsV1CredentialLibrary {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1CredentialLibrary {
|
||||
return ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1CredentialLibrary {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'credentialStore': json['credential_store'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSON(json['credential_store']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'purposes': json['purposes'] == null ? undefined : json['purposes'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSON(json: any): ControllerApiResourcesSessionrecordingsV1CredentialLibrary {
|
||||
return ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1CredentialLibrary | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'credential_store': ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSON(value['credentialStore']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'purposes': value['purposes'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
+105
@@ -0,0 +1,105 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1CredentialStore
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1CredentialStore {
|
||||
/**
|
||||
* The ID of the Credential Store.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The ID of the Scope of which this Credential Store is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
* The name for identification purposes if set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The description for identification purposes if set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* The Credential Store type.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific Credential Store type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1CredentialStore
|
||||
*/
|
||||
attributes?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1CredentialStore interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1CredentialStore(value: object): value is ControllerApiResourcesSessionrecordingsV1CredentialStore {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1CredentialStore {
|
||||
return ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialStoreFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1CredentialStore {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSON(json: any): ControllerApiResourcesSessionrecordingsV1CredentialStore {
|
||||
return ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1CredentialStoreToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1CredentialStore | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'scope_id': value['scopeId'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,129 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1HostCatalog } from './ControllerApiResourcesSessionrecordingsV1HostCatalog';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1HostCatalogToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1HostCatalogToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1HostCatalog';
|
||||
|
||||
/**
|
||||
* Host describes the Host that was chosen for the recorded session.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1Host
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1Host {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Host
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesSessionrecordingsV1HostCatalog}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Host
|
||||
*/
|
||||
hostCatalog?: ControllerApiResourcesSessionrecordingsV1HostCatalog;
|
||||
/**
|
||||
* The name of the Host, if set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Host
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The description of the Host, if set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Host
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Host
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific Host.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Host
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* The external id of the Host, if any.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Host
|
||||
*/
|
||||
externalId?: string;
|
||||
/**
|
||||
* The external name of the Host, if any.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Host
|
||||
*/
|
||||
externalName?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1Host interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1Host(value: object): value is ControllerApiResourcesSessionrecordingsV1Host {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1HostFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1Host {
|
||||
return ControllerApiResourcesSessionrecordingsV1HostFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1HostFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1Host {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'hostCatalog': json['host_catalog'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSON(json['host_catalog']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'externalId': json['external_id'] == null ? undefined : json['external_id'],
|
||||
'externalName': json['external_name'] == null ? undefined : json['external_name'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1HostToJSON(json: any): ControllerApiResourcesSessionrecordingsV1Host {
|
||||
return ControllerApiResourcesSessionrecordingsV1HostToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1HostToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1Host | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'host_catalog': ControllerApiResourcesSessionrecordingsV1HostCatalogToJSON(value['hostCatalog']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
'external_id': value['externalId'],
|
||||
'external_name': value['externalName'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,122 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
* HostCatalog describes the HostCatalog that contains the host chosen for the
|
||||
* recorded session.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1HostCatalog
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1HostCatalog {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* The plugin id used by this Host Catalog, if any.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog
|
||||
*/
|
||||
pluginId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The description of the Host Catalog.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes of the Host Catalog.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1HostCatalog
|
||||
*/
|
||||
attributes?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1HostCatalog interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1HostCatalog(value: object): value is ControllerApiResourcesSessionrecordingsV1HostCatalog {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1HostCatalog {
|
||||
return ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1HostCatalogFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1HostCatalog {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'pluginId': json['plugin_id'] == null ? undefined : json['plugin_id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1HostCatalogToJSON(json: any): ControllerApiResourcesSessionrecordingsV1HostCatalog {
|
||||
return ControllerApiResourcesSessionrecordingsV1HostCatalogToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1HostCatalogToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1HostCatalog | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'plugin_id': value['pluginId'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
+256
@@ -0,0 +1,256 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1ValuesAtTime } from './ControllerApiResourcesSessionrecordingsV1ValuesAtTime';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1ValuesAtTime';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1ConnectionRecording } from './ControllerApiResourcesSessionrecordingsV1ConnectionRecording';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1ConnectionRecording';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
* SessionRecording contains information about the recording of a Session.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1SessionRecording {
|
||||
/**
|
||||
* The ID of the Session recording.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* The ID of the Session which this Session Recording recorded.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
sessionId?: string;
|
||||
/**
|
||||
* The ID of the Storage Bucket for the Target of this Session Recording.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
storageBucketId?: string;
|
||||
/**
|
||||
* The total number of bytes uploaded from the client in the Session.
|
||||
* This includes all bytes uploaded over all Connections, including
|
||||
* any protocol overhead.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
bytesUp?: string;
|
||||
/**
|
||||
* The total number of bytes downloaded to the client in the Session.
|
||||
* This includes all bytes downloaded over all Connections, including
|
||||
* any protocol overhead.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
bytesDown?: string;
|
||||
/**
|
||||
* The time the Session Recording was created in the controller.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
createdTime?: Date;
|
||||
/**
|
||||
* The time of the most recent update to the Session Recording.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
updatedTime?: Date;
|
||||
/**
|
||||
* The time the Session started.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
startTime?: Date;
|
||||
/**
|
||||
* The time the Session ended.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
endTime?: Date;
|
||||
/**
|
||||
* The total duration of the Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
duration?: string;
|
||||
/**
|
||||
* Type of the Session that was recorded (e.g. ssh).
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The current state of the session recording. One of
|
||||
* "started", "available" and "unknown".
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
state?: string;
|
||||
/**
|
||||
* Any error seen during the closing of the session recording.
|
||||
* Currently only set if state is "unknown".
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
errorDetails?: string;
|
||||
/**
|
||||
* MimeTypes define the mime types that can
|
||||
* be used to consume the recording of this Session.
|
||||
* No mime types are currently supported.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
mimeTypes?: Array<string>;
|
||||
/**
|
||||
* The endpoint of the Session; that is, the address to which the egress worker connected.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
endpoint?: string;
|
||||
/**
|
||||
* The recordings of the connections that were created in the Session.
|
||||
* This field may be unset when listing Session recordings.
|
||||
* @type {Array<ControllerApiResourcesSessionrecordingsV1ConnectionRecording>}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
connectionRecordings?: Array<ControllerApiResourcesSessionrecordingsV1ConnectionRecording>;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesSessionrecordingsV1ValuesAtTime}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
createTimeValues?: ControllerApiResourcesSessionrecordingsV1ValuesAtTime;
|
||||
/**
|
||||
* The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
authorizedActions?: Array<string>;
|
||||
/**
|
||||
* The time until a session recording is required to be stored.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
retainUntil?: Date;
|
||||
/**
|
||||
* The time a session recording is scheduled to be automatically deleted.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1SessionRecording
|
||||
*/
|
||||
deleteAfter?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1SessionRecording interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1SessionRecording(value: object): value is ControllerApiResourcesSessionrecordingsV1SessionRecording {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1SessionRecording {
|
||||
return ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1SessionRecordingFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1SessionRecording {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'sessionId': json['session_id'] == null ? undefined : json['session_id'],
|
||||
'storageBucketId': json['storage_bucket_id'] == null ? undefined : json['storage_bucket_id'],
|
||||
'bytesUp': json['bytes_up'] == null ? undefined : json['bytes_up'],
|
||||
'bytesDown': json['bytes_down'] == null ? undefined : json['bytes_down'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'startTime': json['start_time'] == null ? undefined : (new Date(json['start_time'])),
|
||||
'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
|
||||
'duration': json['duration'] == null ? undefined : json['duration'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'state': json['state'] == null ? undefined : json['state'],
|
||||
'errorDetails': json['error_details'] == null ? undefined : json['error_details'],
|
||||
'mimeTypes': json['mime_types'] == null ? undefined : json['mime_types'],
|
||||
'endpoint': json['endpoint'] == null ? undefined : json['endpoint'],
|
||||
'connectionRecordings': json['connection_recordings'] == null ? undefined : ((json['connection_recordings'] as Array<any>).map(ControllerApiResourcesSessionrecordingsV1ConnectionRecordingFromJSON)),
|
||||
'createTimeValues': json['create_time_values'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSON(json['create_time_values']),
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
'retainUntil': json['retain_until'] == null ? undefined : (new Date(json['retain_until'])),
|
||||
'deleteAfter': json['delete_after'] == null ? undefined : (new Date(json['delete_after'])),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSON(json: any): ControllerApiResourcesSessionrecordingsV1SessionRecording {
|
||||
return ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1SessionRecordingToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1SessionRecording | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'session_id': value['sessionId'],
|
||||
'storage_bucket_id': value['storageBucketId'],
|
||||
'bytes_up': value['bytesUp'],
|
||||
'bytes_down': value['bytesDown'],
|
||||
'created_time': value['createdTime'] == null ? undefined : ((value['createdTime']).toISOString()),
|
||||
'updated_time': value['updatedTime'] == null ? undefined : ((value['updatedTime']).toISOString()),
|
||||
'start_time': value['startTime'] == null ? undefined : ((value['startTime']).toISOString()),
|
||||
'end_time': value['endTime'] == null ? undefined : ((value['endTime']).toISOString()),
|
||||
'duration': value['duration'],
|
||||
'type': value['type'],
|
||||
'state': value['state'],
|
||||
'error_details': value['errorDetails'],
|
||||
'mime_types': value['mimeTypes'],
|
||||
'endpoint': value['endpoint'],
|
||||
'connection_recordings': value['connectionRecordings'] == null ? undefined : ((value['connectionRecordings'] as Array<any>).map(ControllerApiResourcesSessionrecordingsV1ConnectionRecordingToJSON)),
|
||||
'create_time_values': ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSON(value['createTimeValues']),
|
||||
'authorized_actions': value['authorizedActions'],
|
||||
'retain_until': value['retainUntil'] == null ? undefined : ((value['retainUntil']).toISOString()),
|
||||
'delete_after': value['deleteAfter'] == null ? undefined : ((value['deleteAfter']).toISOString()),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,153 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
* Target describes a target in Boundary.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1Target {
|
||||
/**
|
||||
* The ID of the Target.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The name of the Target, if set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The description of the Target, if set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Maximum total lifetime of a created Session, in seconds.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
sessionMaxSeconds?: number;
|
||||
/**
|
||||
* Maximum number of connections allowed in a Session. Unlimited is indicated by the value -1.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
sessionConnectionLimit?: number;
|
||||
/**
|
||||
* Optional boolean expression to filter the workers that are allowed to satisfy this request.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
workerFilter?: string;
|
||||
/**
|
||||
* Optional boolean expressions to filter the egress workers that are allowed to satisfy this request.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
egressWorkerFilter?: string;
|
||||
/**
|
||||
* Optional boolean expressions to filter the ingress workers that are allowed to satisfy this request.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
ingressWorkerFilter?: string;
|
||||
/**
|
||||
* The type of the Target.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* The attributes that are applicable for the specific Target.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1Target
|
||||
*/
|
||||
attributes?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1Target interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1Target(value: object): value is ControllerApiResourcesSessionrecordingsV1Target {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1TargetFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1Target {
|
||||
return ControllerApiResourcesSessionrecordingsV1TargetFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1TargetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1Target {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'sessionMaxSeconds': json['session_max_seconds'] == null ? undefined : json['session_max_seconds'],
|
||||
'sessionConnectionLimit': json['session_connection_limit'] == null ? undefined : json['session_connection_limit'],
|
||||
'workerFilter': json['worker_filter'] == null ? undefined : json['worker_filter'],
|
||||
'egressWorkerFilter': json['egress_worker_filter'] == null ? undefined : json['egress_worker_filter'],
|
||||
'ingressWorkerFilter': json['ingress_worker_filter'] == null ? undefined : json['ingress_worker_filter'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1TargetToJSON(json: any): ControllerApiResourcesSessionrecordingsV1Target {
|
||||
return ControllerApiResourcesSessionrecordingsV1TargetToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1TargetToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1Target | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'session_max_seconds': value['sessionMaxSeconds'],
|
||||
'session_connection_limit': value['sessionConnectionLimit'],
|
||||
'worker_filter': value['workerFilter'],
|
||||
'egress_worker_filter': value['egressWorkerFilter'],
|
||||
'ingress_worker_filter': value['ingressWorkerFilter'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,97 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
* User describes an authenticated user in Boundary.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1User
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1User {
|
||||
/**
|
||||
* The ID of the User.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1User
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* The name of the User that created the Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1User
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* The description of the User that created the Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1User
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1User
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1User interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1User(value: object): value is ControllerApiResourcesSessionrecordingsV1User {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1UserFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1User {
|
||||
return ControllerApiResourcesSessionrecordingsV1UserFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1User {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1UserToJSON(json: any): ControllerApiResourcesSessionrecordingsV1User {
|
||||
return ControllerApiResourcesSessionrecordingsV1UserToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1UserToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1User | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,134 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1Host } from './ControllerApiResourcesSessionrecordingsV1Host';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1HostFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1HostFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1HostToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1HostToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1Host';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1Credential } from './ControllerApiResourcesSessionrecordingsV1Credential';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1Credential';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1CredentialLibrary } from './ControllerApiResourcesSessionrecordingsV1CredentialLibrary';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1CredentialLibrary';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1Target } from './ControllerApiResourcesSessionrecordingsV1Target';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1TargetFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1TargetFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1TargetToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1TargetToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1Target';
|
||||
import type { ControllerApiResourcesSessionrecordingsV1User } from './ControllerApiResourcesSessionrecordingsV1User';
|
||||
import {
|
||||
ControllerApiResourcesSessionrecordingsV1UserFromJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1UserFromJSONTyped,
|
||||
ControllerApiResourcesSessionrecordingsV1UserToJSON,
|
||||
ControllerApiResourcesSessionrecordingsV1UserToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionrecordingsV1User';
|
||||
|
||||
/**
|
||||
* ValuesAtTime contain information about other Boundary resources as they
|
||||
* were at a certain time through the lifetime of the Session Recording.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionrecordingsV1ValuesAtTime
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionrecordingsV1ValuesAtTime {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesSessionrecordingsV1User}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ValuesAtTime
|
||||
*/
|
||||
user?: ControllerApiResourcesSessionrecordingsV1User;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesSessionrecordingsV1Target}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ValuesAtTime
|
||||
*/
|
||||
target?: ControllerApiResourcesSessionrecordingsV1Target;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesSessionrecordingsV1Host}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ValuesAtTime
|
||||
*/
|
||||
host?: ControllerApiResourcesSessionrecordingsV1Host;
|
||||
/**
|
||||
* Information about the Credentials used for this session.
|
||||
* @type {Array<ControllerApiResourcesSessionrecordingsV1Credential>}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ValuesAtTime
|
||||
*/
|
||||
credentials?: Array<ControllerApiResourcesSessionrecordingsV1Credential>;
|
||||
/**
|
||||
* Information about the Credential Libraries used for this session.
|
||||
* @type {Array<ControllerApiResourcesSessionrecordingsV1CredentialLibrary>}
|
||||
* @memberof ControllerApiResourcesSessionrecordingsV1ValuesAtTime
|
||||
*/
|
||||
credentialLibraries?: Array<ControllerApiResourcesSessionrecordingsV1CredentialLibrary>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionrecordingsV1ValuesAtTime interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionrecordingsV1ValuesAtTime(value: object): value is ControllerApiResourcesSessionrecordingsV1ValuesAtTime {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSON(json: any): ControllerApiResourcesSessionrecordingsV1ValuesAtTime {
|
||||
return ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ValuesAtTimeFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionrecordingsV1ValuesAtTime {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'user': json['user'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1UserFromJSON(json['user']),
|
||||
'target': json['target'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1TargetFromJSON(json['target']),
|
||||
'host': json['host'] == null ? undefined : ControllerApiResourcesSessionrecordingsV1HostFromJSON(json['host']),
|
||||
'credentials': json['credentials'] == null ? undefined : ((json['credentials'] as Array<any>).map(ControllerApiResourcesSessionrecordingsV1CredentialFromJSON)),
|
||||
'credentialLibraries': json['credential_libraries'] == null ? undefined : ((json['credential_libraries'] as Array<any>).map(ControllerApiResourcesSessionrecordingsV1CredentialLibraryFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSON(json: any): ControllerApiResourcesSessionrecordingsV1ValuesAtTime {
|
||||
return ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionrecordingsV1ValuesAtTimeToJSONTyped(value?: ControllerApiResourcesSessionrecordingsV1ValuesAtTime | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'user': ControllerApiResourcesSessionrecordingsV1UserToJSON(value['user']),
|
||||
'target': ControllerApiResourcesSessionrecordingsV1TargetToJSON(value['target']),
|
||||
'host': ControllerApiResourcesSessionrecordingsV1HostToJSON(value['host']),
|
||||
'credentials': value['credentials'] == null ? undefined : ((value['credentials'] as Array<any>).map(ControllerApiResourcesSessionrecordingsV1CredentialToJSON)),
|
||||
'credential_libraries': value['credentialLibraries'] == null ? undefined : ((value['credentialLibraries'] as Array<any>).map(ControllerApiResourcesSessionrecordingsV1CredentialLibraryToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionsV1Connection
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionsV1Connection {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Connection
|
||||
*/
|
||||
clientTcpAddress?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesSessionsV1Connection
|
||||
*/
|
||||
clientTcpPort?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Connection
|
||||
*/
|
||||
endpointTcpAddress?: string;
|
||||
/**
|
||||
*
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesSessionsV1Connection
|
||||
*/
|
||||
endpointTcpPort?: number;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Connection
|
||||
*/
|
||||
bytesUp?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Connection
|
||||
*/
|
||||
bytesDown?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Connection
|
||||
*/
|
||||
closedReason?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionsV1Connection interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionsV1Connection(value: object): value is ControllerApiResourcesSessionsV1Connection {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1ConnectionFromJSON(json: any): ControllerApiResourcesSessionsV1Connection {
|
||||
return ControllerApiResourcesSessionsV1ConnectionFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1ConnectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionsV1Connection {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'clientTcpAddress': json['client_tcp_address'] == null ? undefined : json['client_tcp_address'],
|
||||
'clientTcpPort': json['client_tcp_port'] == null ? undefined : json['client_tcp_port'],
|
||||
'endpointTcpAddress': json['endpoint_tcp_address'] == null ? undefined : json['endpoint_tcp_address'],
|
||||
'endpointTcpPort': json['endpoint_tcp_port'] == null ? undefined : json['endpoint_tcp_port'],
|
||||
'bytesUp': json['bytes_up'] == null ? undefined : json['bytes_up'],
|
||||
'bytesDown': json['bytes_down'] == null ? undefined : json['bytes_down'],
|
||||
'closedReason': json['closed_reason'] == null ? undefined : json['closed_reason'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1ConnectionToJSON(json: any): ControllerApiResourcesSessionsV1Connection {
|
||||
return ControllerApiResourcesSessionsV1ConnectionToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1ConnectionToJSONTyped(value?: ControllerApiResourcesSessionsV1Connection | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'client_tcp_address': value['clientTcpAddress'],
|
||||
'client_tcp_port': value['clientTcpPort'],
|
||||
'endpoint_tcp_address': value['endpointTcpAddress'],
|
||||
'endpoint_tcp_port': value['endpointTcpPort'],
|
||||
'bytes_up': value['bytesUp'],
|
||||
'bytes_down': value['bytesDown'],
|
||||
'closed_reason': value['closedReason'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesSessionsV1Connection } from './ControllerApiResourcesSessionsV1Connection';
|
||||
import {
|
||||
ControllerApiResourcesSessionsV1ConnectionFromJSON,
|
||||
ControllerApiResourcesSessionsV1ConnectionFromJSONTyped,
|
||||
ControllerApiResourcesSessionsV1ConnectionToJSON,
|
||||
ControllerApiResourcesSessionsV1ConnectionToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionsV1Connection';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import type { ControllerApiResourcesSessionsV1SessionState } from './ControllerApiResourcesSessionsV1SessionState';
|
||||
import {
|
||||
ControllerApiResourcesSessionsV1SessionStateFromJSON,
|
||||
ControllerApiResourcesSessionsV1SessionStateFromJSONTyped,
|
||||
ControllerApiResourcesSessionsV1SessionStateToJSON,
|
||||
ControllerApiResourcesSessionsV1SessionStateToJSONTyped,
|
||||
} from './ControllerApiResourcesSessionsV1SessionState';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionsV1Session {
|
||||
/**
|
||||
* Output only. The ID of the Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* Output only. The ID of the Target that created this Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly targetId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used when canceling this Session to ensure that the operation is acting on a known session state.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* Output only. Type of the Session (e.g. tcp).
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly type?: string;
|
||||
/**
|
||||
* Output only. After this time the connection will be expired, e.g. forcefully terminated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly expirationTime?: Date;
|
||||
/**
|
||||
* Output only. The ID of the Auth Token used to authenticate.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly authTokenId?: string;
|
||||
/**
|
||||
* Output only. The ID of the User that requested the Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly userId?: string;
|
||||
/**
|
||||
* Output only. The Host Set sourcing the Host for this Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly hostSetId?: string;
|
||||
/**
|
||||
* Output only. The Host used by the Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly hostId?: string;
|
||||
/**
|
||||
* Output only. The Scope of the Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly scopeId?: string;
|
||||
/**
|
||||
* Output only. The endpoint of the Session; that is, the address to which the worker is proxying data.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly endpoint?: string;
|
||||
/**
|
||||
* Output only. The states of this Session in descending order from the current state to the first.
|
||||
* @type {Array<ControllerApiResourcesSessionsV1SessionState>}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly states?: Array<ControllerApiResourcesSessionsV1SessionState>;
|
||||
/**
|
||||
* Output only. The current status of this Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly status?: string;
|
||||
/**
|
||||
* Output only. The certificate generated for the session. Raw DER bytes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly certificate?: string;
|
||||
/**
|
||||
* Output only. If the session is terminated, this provides a short description as to why.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly terminationReason?: string;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
/**
|
||||
* Output only. The associated connections with this session.
|
||||
* @type {Array<ControllerApiResourcesSessionsV1Connection>}
|
||||
* @memberof ControllerApiResourcesSessionsV1Session
|
||||
*/
|
||||
readonly connections?: Array<ControllerApiResourcesSessionsV1Connection>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionsV1Session interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionsV1Session(value: object): value is ControllerApiResourcesSessionsV1Session {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1SessionFromJSON(json: any): ControllerApiResourcesSessionsV1Session {
|
||||
return ControllerApiResourcesSessionsV1SessionFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1SessionFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionsV1Session {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'targetId': json['target_id'] == null ? undefined : json['target_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'expirationTime': json['expiration_time'] == null ? undefined : (new Date(json['expiration_time'])),
|
||||
'authTokenId': json['auth_token_id'] == null ? undefined : json['auth_token_id'],
|
||||
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
||||
'hostSetId': json['host_set_id'] == null ? undefined : json['host_set_id'],
|
||||
'hostId': json['host_id'] == null ? undefined : json['host_id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'endpoint': json['endpoint'] == null ? undefined : json['endpoint'],
|
||||
'states': json['states'] == null ? undefined : ((json['states'] as Array<any>).map(ControllerApiResourcesSessionsV1SessionStateFromJSON)),
|
||||
'status': json['status'] == null ? undefined : json['status'],
|
||||
'certificate': json['certificate'] == null ? undefined : json['certificate'],
|
||||
'terminationReason': json['termination_reason'] == null ? undefined : json['termination_reason'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
'connections': json['connections'] == null ? undefined : ((json['connections'] as Array<any>).map(ControllerApiResourcesSessionsV1ConnectionFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1SessionToJSON(json: any): ControllerApiResourcesSessionsV1Session {
|
||||
return ControllerApiResourcesSessionsV1SessionToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1SessionToJSONTyped(value?: Omit<ControllerApiResourcesSessionsV1Session, 'id'|'target_id'|'created_time'|'updated_time'|'type'|'expiration_time'|'auth_token_id'|'user_id'|'host_set_id'|'host_id'|'scope_id'|'endpoint'|'states'|'status'|'certificate'|'termination_reason'|'authorized_actions'|'connections'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'version': value['version'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,79 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesSessionsV1SessionState
|
||||
*/
|
||||
export interface ControllerApiResourcesSessionsV1SessionState {
|
||||
/**
|
||||
* The status of the Session, e.g. "pending", "active", "canceling", "terminated".
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesSessionsV1SessionState
|
||||
*/
|
||||
status?: string;
|
||||
/**
|
||||
* Output only. The time the Session entered this state.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionsV1SessionState
|
||||
*/
|
||||
readonly startTime?: Date;
|
||||
/**
|
||||
* Output only. The time the Session stopped being in this state.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesSessionsV1SessionState
|
||||
*/
|
||||
readonly endTime?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesSessionsV1SessionState interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesSessionsV1SessionState(value: object): value is ControllerApiResourcesSessionsV1SessionState {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1SessionStateFromJSON(json: any): ControllerApiResourcesSessionsV1SessionState {
|
||||
return ControllerApiResourcesSessionsV1SessionStateFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1SessionStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesSessionsV1SessionState {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'status': json['status'] == null ? undefined : json['status'],
|
||||
'startTime': json['start_time'] == null ? undefined : (new Date(json['start_time'])),
|
||||
'endTime': json['end_time'] == null ? undefined : (new Date(json['end_time'])),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1SessionStateToJSON(json: any): ControllerApiResourcesSessionsV1SessionState {
|
||||
return ControllerApiResourcesSessionsV1SessionStateToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesSessionsV1SessionStateToJSONTyped(value?: Omit<ControllerApiResourcesSessionsV1SessionState, 'start_time'|'end_time'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'status': value['status'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,220 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesPluginsV1PluginInfo } from './ControllerApiResourcesPluginsV1PluginInfo';
|
||||
import {
|
||||
ControllerApiResourcesPluginsV1PluginInfoFromJSON,
|
||||
ControllerApiResourcesPluginsV1PluginInfoFromJSONTyped,
|
||||
ControllerApiResourcesPluginsV1PluginInfoToJSON,
|
||||
ControllerApiResourcesPluginsV1PluginInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesPluginsV1PluginInfo';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
export interface ControllerApiResourcesStoragebucketsV1StorageBucket {
|
||||
/**
|
||||
* Output only. The ID of the storage bucket.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the Scope of which this storage bucket is a part.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* The ID of the plugin of which this storage bucket is created.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
pluginId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesPluginsV1PluginInfo}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
plugin?: ControllerApiResourcesPluginsV1PluginInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* The name of the bucket within the external object store service.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
bucketName?: string;
|
||||
/**
|
||||
* The prefix used to organize the data held within the external object store.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
bucketPrefix?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The type of Storage Bucket (currently only plugin).
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* Attributes specific to the catalog type.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Secrets specific to the storage bucket type. These are never output.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
secrets?: object;
|
||||
/**
|
||||
* Output only. The HMAC of the last secrets supplied via the API, if any.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
readonly secretsHmac?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
workerFilter?: string;
|
||||
/**
|
||||
* Internal use only. The storage bucket credential id for this storage bucket.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
storageBucketCredentialId?: string;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesStoragebucketsV1StorageBucket
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesStoragebucketsV1StorageBucket interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesStoragebucketsV1StorageBucket(value: object): value is ControllerApiResourcesStoragebucketsV1StorageBucket {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesStoragebucketsV1StorageBucketFromJSON(json: any): ControllerApiResourcesStoragebucketsV1StorageBucket {
|
||||
return ControllerApiResourcesStoragebucketsV1StorageBucketFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesStoragebucketsV1StorageBucketFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesStoragebucketsV1StorageBucket {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'pluginId': json['plugin_id'] == null ? undefined : json['plugin_id'],
|
||||
'plugin': json['plugin'] == null ? undefined : ControllerApiResourcesPluginsV1PluginInfoFromJSON(json['plugin']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'bucketName': json['bucket_name'] == null ? undefined : json['bucket_name'],
|
||||
'bucketPrefix': json['bucket_prefix'] == null ? undefined : json['bucket_prefix'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'secrets': json['secrets'] == null ? undefined : json['secrets'],
|
||||
'secretsHmac': json['secrets_hmac'] == null ? undefined : json['secrets_hmac'],
|
||||
'workerFilter': json['worker_filter'] == null ? undefined : json['worker_filter'],
|
||||
'storageBucketCredentialId': json['storage_bucket_credential_id'] == null ? undefined : json['storage_bucket_credential_id'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesStoragebucketsV1StorageBucketToJSON(json: any): ControllerApiResourcesStoragebucketsV1StorageBucket {
|
||||
return ControllerApiResourcesStoragebucketsV1StorageBucketToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesStoragebucketsV1StorageBucketToJSONTyped(value?: Omit<ControllerApiResourcesStoragebucketsV1StorageBucket, 'id'|'created_time'|'updated_time'|'secrets_hmac'|'authorized_actions'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'plugin_id': value['pluginId'],
|
||||
'plugin': ControllerApiResourcesPluginsV1PluginInfoToJSON(value['plugin']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'bucket_name': value['bucketName'],
|
||||
'bucket_prefix': value['bucketPrefix'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'attributes': value['attributes'],
|
||||
'secrets': value['secrets'],
|
||||
'worker_filter': value['workerFilter'],
|
||||
'storage_bucket_credential_id': value['storageBucketCredentialId'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesTargetsV1TargetAliasAttributes } from './ControllerApiResourcesTargetsV1TargetAliasAttributes';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSON,
|
||||
ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSONTyped,
|
||||
ControllerApiResourcesTargetsV1TargetAliasAttributesToJSON,
|
||||
ControllerApiResourcesTargetsV1TargetAliasAttributesToJSONTyped,
|
||||
} from './ControllerApiResourcesTargetsV1TargetAliasAttributes';
|
||||
|
||||
/**
|
||||
* Alias is the alias information related to the aliases associated with the target.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesTargetsV1Alias
|
||||
*/
|
||||
export interface ControllerApiResourcesTargetsV1Alias {
|
||||
/**
|
||||
* Output only. The ID of the alias referencing this target.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Alias
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* Ouput only. The value of the alias referencing this target.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Alias
|
||||
*/
|
||||
value?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Alias
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesTargetsV1TargetAliasAttributes}
|
||||
* @memberof ControllerApiResourcesTargetsV1Alias
|
||||
*/
|
||||
attributes?: ControllerApiResourcesTargetsV1TargetAliasAttributes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesTargetsV1Alias interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesTargetsV1Alias(value: object): value is ControllerApiResourcesTargetsV1Alias {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1AliasFromJSON(json: any): ControllerApiResourcesTargetsV1Alias {
|
||||
return ControllerApiResourcesTargetsV1AliasFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1AliasFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1Alias {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'value': json['value'] == null ? undefined : json['value'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'attributes': json['attributes'] == null ? undefined : ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSON(json['attributes']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1AliasToJSON(json: any): ControllerApiResourcesTargetsV1Alias {
|
||||
return ControllerApiResourcesTargetsV1AliasToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1AliasToJSONTyped(value?: Omit<ControllerApiResourcesTargetsV1Alias, 'id'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'value': value['value'],
|
||||
'scope_id': value['scopeId'],
|
||||
'attributes': ControllerApiResourcesTargetsV1TargetAliasAttributesToJSON(value['attributes']),
|
||||
};
|
||||
}
|
||||
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesTargetsV1AuthorizeSessionArguments
|
||||
*/
|
||||
export interface ControllerApiResourcesTargetsV1AuthorizeSessionArguments {
|
||||
/**
|
||||
* host_id is the id of the host that the session will be authorized for.
|
||||
* When specified authorizing a session using this alias will have the same
|
||||
* effect of authorizing a session to the alias' destination_id and passing
|
||||
* in this value through the -host-id flag. If the host-id flag is also
|
||||
* specified when calling authorize-session an error will be returned unless
|
||||
* the provided host-id matches this value.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1AuthorizeSessionArguments
|
||||
*/
|
||||
hostId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesTargetsV1AuthorizeSessionArguments interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesTargetsV1AuthorizeSessionArguments(value: object): value is ControllerApiResourcesTargetsV1AuthorizeSessionArguments {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSON(json: any): ControllerApiResourcesTargetsV1AuthorizeSessionArguments {
|
||||
return ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1AuthorizeSessionArguments {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'hostId': json['host_id'] == null ? undefined : json['host_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSON(json: any): ControllerApiResourcesTargetsV1AuthorizeSessionArguments {
|
||||
return ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSONTyped(value?: ControllerApiResourcesTargetsV1AuthorizeSessionArguments | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'host_id': value['hostId'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,100 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesTargetsV1CredentialSource
|
||||
*/
|
||||
export interface ControllerApiResourcesTargetsV1CredentialSource {
|
||||
/**
|
||||
* The ID of the Credential. May be empty if the credential is dynamically generated from a library.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1CredentialSource
|
||||
*/
|
||||
id?: string;
|
||||
/**
|
||||
* Output only. The name of the Credential source.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1CredentialSource
|
||||
*/
|
||||
readonly name?: string;
|
||||
/**
|
||||
* Output only. The description of the Credential source.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1CredentialSource
|
||||
*/
|
||||
readonly description?: string;
|
||||
/**
|
||||
* Output only. The Credential Store to which this Credential source belongs.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1CredentialSource
|
||||
*/
|
||||
readonly credentialStoreId?: string;
|
||||
/**
|
||||
* Output only. The type of the credential source (e.g. "vault"; not the type of the credential itself).
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1CredentialSource
|
||||
*/
|
||||
readonly type?: string;
|
||||
/**
|
||||
* Output only. The type of the credential, empty if unspecified.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1CredentialSource
|
||||
*/
|
||||
readonly credentialType?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesTargetsV1CredentialSource interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesTargetsV1CredentialSource(value: object): value is ControllerApiResourcesTargetsV1CredentialSource {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1CredentialSourceFromJSON(json: any): ControllerApiResourcesTargetsV1CredentialSource {
|
||||
return ControllerApiResourcesTargetsV1CredentialSourceFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1CredentialSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1CredentialSource {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'credentialStoreId': json['credential_store_id'] == null ? undefined : json['credential_store_id'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'credentialType': json['credential_type'] == null ? undefined : json['credential_type'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1CredentialSourceToJSON(json: any): ControllerApiResourcesTargetsV1CredentialSource {
|
||||
return ControllerApiResourcesTargetsV1CredentialSourceToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1CredentialSourceToJSONTyped(value?: Omit<ControllerApiResourcesTargetsV1CredentialSource, 'name'|'description'|'credential_store_id'|'type'|'credential_type'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'id': value['id'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesTargetsV1HostSource
|
||||
*/
|
||||
export interface ControllerApiResourcesTargetsV1HostSource {
|
||||
/**
|
||||
* Output only. The ID of the Host Set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1HostSource
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* Output only. The Host Catalog to which this Host Source belongs.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1HostSource
|
||||
*/
|
||||
readonly hostCatalogId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesTargetsV1HostSource interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesTargetsV1HostSource(value: object): value is ControllerApiResourcesTargetsV1HostSource {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1HostSourceFromJSON(json: any): ControllerApiResourcesTargetsV1HostSource {
|
||||
return ControllerApiResourcesTargetsV1HostSourceFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1HostSourceFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1HostSource {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'hostCatalogId': json['host_catalog_id'] == null ? undefined : json['host_catalog_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1HostSourceToJSON(json: any): ControllerApiResourcesTargetsV1HostSource {
|
||||
return ControllerApiResourcesTargetsV1HostSourceToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1HostSourceToJSONTyped(value?: Omit<ControllerApiResourcesTargetsV1HostSource, 'id'|'host_catalog_id'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,179 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesTargetsV1SessionCredential } from './ControllerApiResourcesTargetsV1SessionCredential';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1SessionCredentialFromJSON,
|
||||
ControllerApiResourcesTargetsV1SessionCredentialFromJSONTyped,
|
||||
ControllerApiResourcesTargetsV1SessionCredentialToJSON,
|
||||
ControllerApiResourcesTargetsV1SessionCredentialToJSONTyped,
|
||||
} from './ControllerApiResourcesTargetsV1SessionCredential';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
* SessionAuthorization contains all fields related to authorization for a Session. It's in the Targets package because it's returned by a Target's authorize action.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
export interface ControllerApiResourcesTargetsV1SessionAuthorization {
|
||||
/**
|
||||
* Output only. The ID of the Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly sessionId?: string;
|
||||
/**
|
||||
* Output only. The ID of the Target authorizing this Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly targetId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The User for which this Session was authorized.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly userId?: string;
|
||||
/**
|
||||
* Output only. The Host Set containing the Host being used for this Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly hostSetId?: string;
|
||||
/**
|
||||
* Output only. The Host whose address is being used as the endpoint for this Session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly hostId?: string;
|
||||
/**
|
||||
* Output only. Type of the Session (e.g. tcp, ssh, etc.).
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly type?: string;
|
||||
/**
|
||||
* Output only. The marshaled SessionAuthorizationData message containing all information that the proxy needs.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly authorizationToken?: string;
|
||||
/**
|
||||
* Output only. The connection limit being applied to this session. -1 means unlimited. This is not actually enforced on the client side but it provides for better listener handling by including it.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly connectionLimit?: number;
|
||||
/**
|
||||
* Output only. The endpoint address that the worker will connect to, useful for setting TLS parameters.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly endpoint?: string;
|
||||
/**
|
||||
* Output only. The endpoint port that will be connected to, either from a
|
||||
* port directly on the target or from a service definition.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly endpointPort?: number;
|
||||
/**
|
||||
* Output only. The expiration time of the session.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly expiration?: Date;
|
||||
/**
|
||||
* Output only. The credentials for this session.
|
||||
* @type {Array<ControllerApiResourcesTargetsV1SessionCredential>}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly credentials?: Array<ControllerApiResourcesTargetsV1SessionCredential>;
|
||||
/**
|
||||
* Output only. The ID of the Session Recording.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionAuthorization
|
||||
*/
|
||||
readonly sessionRecordingId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesTargetsV1SessionAuthorization interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesTargetsV1SessionAuthorization(value: object): value is ControllerApiResourcesTargetsV1SessionAuthorization {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionAuthorizationFromJSON(json: any): ControllerApiResourcesTargetsV1SessionAuthorization {
|
||||
return ControllerApiResourcesTargetsV1SessionAuthorizationFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionAuthorizationFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1SessionAuthorization {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'sessionId': json['session_id'] == null ? undefined : json['session_id'],
|
||||
'targetId': json['target_id'] == null ? undefined : json['target_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'userId': json['user_id'] == null ? undefined : json['user_id'],
|
||||
'hostSetId': json['host_set_id'] == null ? undefined : json['host_set_id'],
|
||||
'hostId': json['host_id'] == null ? undefined : json['host_id'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'authorizationToken': json['authorization_token'] == null ? undefined : json['authorization_token'],
|
||||
'connectionLimit': json['connection_limit'] == null ? undefined : json['connection_limit'],
|
||||
'endpoint': json['endpoint'] == null ? undefined : json['endpoint'],
|
||||
'endpointPort': json['endpoint_port'] == null ? undefined : json['endpoint_port'],
|
||||
'expiration': json['expiration'] == null ? undefined : (new Date(json['expiration'])),
|
||||
'credentials': json['credentials'] == null ? undefined : ((json['credentials'] as Array<any>).map(ControllerApiResourcesTargetsV1SessionCredentialFromJSON)),
|
||||
'sessionRecordingId': json['session_recording_id'] == null ? undefined : json['session_recording_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionAuthorizationToJSON(json: any): ControllerApiResourcesTargetsV1SessionAuthorization {
|
||||
return ControllerApiResourcesTargetsV1SessionAuthorizationToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionAuthorizationToJSONTyped(value?: Omit<ControllerApiResourcesTargetsV1SessionAuthorization, 'session_id'|'target_id'|'created_time'|'user_id'|'host_set_id'|'host_id'|'type'|'authorization_token'|'connection_limit'|'endpoint'|'endpoint_port'|'expiration'|'credentials'|'session_recording_id'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesTargetsV1CredentialSource } from './ControllerApiResourcesTargetsV1CredentialSource';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1CredentialSourceFromJSON,
|
||||
ControllerApiResourcesTargetsV1CredentialSourceFromJSONTyped,
|
||||
ControllerApiResourcesTargetsV1CredentialSourceToJSON,
|
||||
ControllerApiResourcesTargetsV1CredentialSourceToJSONTyped,
|
||||
} from './ControllerApiResourcesTargetsV1CredentialSource';
|
||||
import type { ControllerApiResourcesTargetsV1SessionSecret } from './ControllerApiResourcesTargetsV1SessionSecret';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1SessionSecretFromJSON,
|
||||
ControllerApiResourcesTargetsV1SessionSecretFromJSONTyped,
|
||||
ControllerApiResourcesTargetsV1SessionSecretToJSON,
|
||||
ControllerApiResourcesTargetsV1SessionSecretToJSONTyped,
|
||||
} from './ControllerApiResourcesTargetsV1SessionSecret';
|
||||
|
||||
/**
|
||||
* Credential information for a session.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesTargetsV1SessionCredential
|
||||
*/
|
||||
export interface ControllerApiResourcesTargetsV1SessionCredential {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesTargetsV1CredentialSource}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionCredential
|
||||
*/
|
||||
credentialSource?: ControllerApiResourcesTargetsV1CredentialSource;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesTargetsV1SessionSecret}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionCredential
|
||||
*/
|
||||
secret?: ControllerApiResourcesTargetsV1SessionSecret;
|
||||
/**
|
||||
* Output only. The fields of the strongly typed credential, empty if the credential type of the
|
||||
* credential source is unspecified.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionCredential
|
||||
*/
|
||||
readonly credential?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesTargetsV1SessionCredential interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesTargetsV1SessionCredential(value: object): value is ControllerApiResourcesTargetsV1SessionCredential {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionCredentialFromJSON(json: any): ControllerApiResourcesTargetsV1SessionCredential {
|
||||
return ControllerApiResourcesTargetsV1SessionCredentialFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionCredentialFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1SessionCredential {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'credentialSource': json['credential_source'] == null ? undefined : ControllerApiResourcesTargetsV1CredentialSourceFromJSON(json['credential_source']),
|
||||
'secret': json['secret'] == null ? undefined : ControllerApiResourcesTargetsV1SessionSecretFromJSON(json['secret']),
|
||||
'credential': json['credential'] == null ? undefined : json['credential'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionCredentialToJSON(json: any): ControllerApiResourcesTargetsV1SessionCredential {
|
||||
return ControllerApiResourcesTargetsV1SessionCredentialToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionCredentialToJSONTyped(value?: Omit<ControllerApiResourcesTargetsV1SessionCredential, 'credential'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'credential_source': ControllerApiResourcesTargetsV1CredentialSourceToJSON(value['credentialSource']),
|
||||
'secret': ControllerApiResourcesTargetsV1SessionSecretToJSON(value['secret']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,72 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
* The actual secret for a session credential.
|
||||
* @export
|
||||
* @interface ControllerApiResourcesTargetsV1SessionSecret
|
||||
*/
|
||||
export interface ControllerApiResourcesTargetsV1SessionSecret {
|
||||
/**
|
||||
* Output only. The base64-encoded value representing the raw bytes from the
|
||||
* credential provider.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionSecret
|
||||
*/
|
||||
readonly raw?: string;
|
||||
/**
|
||||
* Output only. The decoded raw string, if a JSON object.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesTargetsV1SessionSecret
|
||||
*/
|
||||
readonly decoded?: object;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesTargetsV1SessionSecret interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesTargetsV1SessionSecret(value: object): value is ControllerApiResourcesTargetsV1SessionSecret {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionSecretFromJSON(json: any): ControllerApiResourcesTargetsV1SessionSecret {
|
||||
return ControllerApiResourcesTargetsV1SessionSecretFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionSecretFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1SessionSecret {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'raw': json['raw'] == null ? undefined : json['raw'],
|
||||
'decoded': json['decoded'] == null ? undefined : json['decoded'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionSecretToJSON(json: any): ControllerApiResourcesTargetsV1SessionSecret {
|
||||
return ControllerApiResourcesTargetsV1SessionSecretToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1SessionSecretToJSONTyped(value?: Omit<ControllerApiResourcesTargetsV1SessionSecret, 'raw'|'decoded'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,279 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesTargetsV1HostSource } from './ControllerApiResourcesTargetsV1HostSource';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1HostSourceFromJSON,
|
||||
ControllerApiResourcesTargetsV1HostSourceFromJSONTyped,
|
||||
ControllerApiResourcesTargetsV1HostSourceToJSON,
|
||||
ControllerApiResourcesTargetsV1HostSourceToJSONTyped,
|
||||
} from './ControllerApiResourcesTargetsV1HostSource';
|
||||
import type { ControllerApiResourcesTargetsV1Alias } from './ControllerApiResourcesTargetsV1Alias';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1AliasFromJSON,
|
||||
ControllerApiResourcesTargetsV1AliasFromJSONTyped,
|
||||
ControllerApiResourcesTargetsV1AliasToJSON,
|
||||
ControllerApiResourcesTargetsV1AliasToJSONTyped,
|
||||
} from './ControllerApiResourcesTargetsV1Alias';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import type { ControllerApiResourcesTargetsV1CredentialSource } from './ControllerApiResourcesTargetsV1CredentialSource';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1CredentialSourceFromJSON,
|
||||
ControllerApiResourcesTargetsV1CredentialSourceFromJSONTyped,
|
||||
ControllerApiResourcesTargetsV1CredentialSourceToJSON,
|
||||
ControllerApiResourcesTargetsV1CredentialSourceToJSONTyped,
|
||||
} from './ControllerApiResourcesTargetsV1CredentialSource';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
export interface ControllerApiResourcesTargetsV1Target {
|
||||
/**
|
||||
* Output only. The ID of the resource.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The Scope of of this resource. This must be defined for creation of this resource, but is otherwise output only.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Required name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The type of the Target.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
type?: string;
|
||||
/**
|
||||
* Output only. The IDs of the Host Sources associated with this Target.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly hostSourceIds?: Array<string>;
|
||||
/**
|
||||
* Output only. The Host Sources associated with this Target.
|
||||
* @type {Array<ControllerApiResourcesTargetsV1HostSource>}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly hostSources?: Array<ControllerApiResourcesTargetsV1HostSource>;
|
||||
/**
|
||||
* Maximum total lifetime of a created Session, in seconds.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
sessionMaxSeconds?: number;
|
||||
/**
|
||||
* Maximum number of connections allowed in a Session. Unlimited is indicated by the value -1.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
sessionConnectionLimit?: number;
|
||||
/**
|
||||
* Optional boolean expression to filter the workers that are allowed to satisfy this request.
|
||||
* Deprecated; use egress or ingress worker filters instead.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
workerFilter?: string;
|
||||
/**
|
||||
* Optional boolean expressions to filter the egress workers that are allowed to satisfy this request.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
egressWorkerFilter?: string;
|
||||
/**
|
||||
* Optional boolean expressions to filter the ingress workers that are allowed to satisfy this request.
|
||||
* Unsupported on OSS.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
ingressWorkerFilter?: string;
|
||||
/**
|
||||
* Output only. The IDs of the brokered credential source ids associated with this Target.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly brokeredCredentialSourceIds?: Array<string>;
|
||||
/**
|
||||
* Output only. The brokered credential sources associated with this Target.
|
||||
* @type {Array<ControllerApiResourcesTargetsV1CredentialSource>}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly brokeredCredentialSources?: Array<ControllerApiResourcesTargetsV1CredentialSource>;
|
||||
/**
|
||||
* Output only. The IDs of the injected application credential source ids associated with this Target.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly injectedApplicationCredentialSourceIds?: Array<string>;
|
||||
/**
|
||||
* Output only. The injected application credential sources associated with this Target.
|
||||
* @type {Array<ControllerApiResourcesTargetsV1CredentialSource>}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly injectedApplicationCredentialSources?: Array<ControllerApiResourcesTargetsV1CredentialSource>;
|
||||
/**
|
||||
* The attributes that are applicable for the specific Target.
|
||||
* @type {object}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
attributes?: object;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
/**
|
||||
* Optional string value that represents a network resource and is used when establishing a session.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
address?: string;
|
||||
/**
|
||||
* Output only. The aliases that point to this Target.
|
||||
* @type {Array<ControllerApiResourcesTargetsV1Alias>}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
readonly aliases?: Array<ControllerApiResourcesTargetsV1Alias>;
|
||||
/**
|
||||
* Input only. with_aliases specify the aliases that should be created when
|
||||
* the target is created. This field is only usable at target creation time.
|
||||
* @type {Array<ControllerApiResourcesTargetsV1Alias>}
|
||||
* @memberof ControllerApiResourcesTargetsV1Target
|
||||
*/
|
||||
withAliases?: Array<ControllerApiResourcesTargetsV1Alias>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesTargetsV1Target interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesTargetsV1Target(value: object): value is ControllerApiResourcesTargetsV1Target {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1TargetFromJSON(json: any): ControllerApiResourcesTargetsV1Target {
|
||||
return ControllerApiResourcesTargetsV1TargetFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1TargetFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1Target {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'hostSourceIds': json['host_source_ids'] == null ? undefined : json['host_source_ids'],
|
||||
'hostSources': json['host_sources'] == null ? undefined : ((json['host_sources'] as Array<any>).map(ControllerApiResourcesTargetsV1HostSourceFromJSON)),
|
||||
'sessionMaxSeconds': json['session_max_seconds'] == null ? undefined : json['session_max_seconds'],
|
||||
'sessionConnectionLimit': json['session_connection_limit'] == null ? undefined : json['session_connection_limit'],
|
||||
'workerFilter': json['worker_filter'] == null ? undefined : json['worker_filter'],
|
||||
'egressWorkerFilter': json['egress_worker_filter'] == null ? undefined : json['egress_worker_filter'],
|
||||
'ingressWorkerFilter': json['ingress_worker_filter'] == null ? undefined : json['ingress_worker_filter'],
|
||||
'brokeredCredentialSourceIds': json['brokered_credential_source_ids'] == null ? undefined : json['brokered_credential_source_ids'],
|
||||
'brokeredCredentialSources': json['brokered_credential_sources'] == null ? undefined : ((json['brokered_credential_sources'] as Array<any>).map(ControllerApiResourcesTargetsV1CredentialSourceFromJSON)),
|
||||
'injectedApplicationCredentialSourceIds': json['injected_application_credential_source_ids'] == null ? undefined : json['injected_application_credential_source_ids'],
|
||||
'injectedApplicationCredentialSources': json['injected_application_credential_sources'] == null ? undefined : ((json['injected_application_credential_sources'] as Array<any>).map(ControllerApiResourcesTargetsV1CredentialSourceFromJSON)),
|
||||
'attributes': json['attributes'] == null ? undefined : json['attributes'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
'address': json['address'] == null ? undefined : json['address'],
|
||||
'aliases': json['aliases'] == null ? undefined : ((json['aliases'] as Array<any>).map(ControllerApiResourcesTargetsV1AliasFromJSON)),
|
||||
'withAliases': json['with_aliases'] == null ? undefined : ((json['with_aliases'] as Array<any>).map(ControllerApiResourcesTargetsV1AliasFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1TargetToJSON(json: any): ControllerApiResourcesTargetsV1Target {
|
||||
return ControllerApiResourcesTargetsV1TargetToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1TargetToJSONTyped(value?: Omit<ControllerApiResourcesTargetsV1Target, 'id'|'created_time'|'updated_time'|'host_source_ids'|'host_sources'|'brokered_credential_source_ids'|'brokered_credential_sources'|'injected_application_credential_source_ids'|'injected_application_credential_sources'|'authorized_actions'|'aliases'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'type': value['type'],
|
||||
'session_max_seconds': value['sessionMaxSeconds'],
|
||||
'session_connection_limit': value['sessionConnectionLimit'],
|
||||
'worker_filter': value['workerFilter'],
|
||||
'egress_worker_filter': value['egressWorkerFilter'],
|
||||
'ingress_worker_filter': value['ingressWorkerFilter'],
|
||||
'attributes': value['attributes'],
|
||||
'address': value['address'],
|
||||
'with_aliases': value['withAliases'] == null ? undefined : ((value['withAliases'] as Array<any>).map(ControllerApiResourcesTargetsV1AliasToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesTargetsV1AuthorizeSessionArguments } from './ControllerApiResourcesTargetsV1AuthorizeSessionArguments';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSON,
|
||||
ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSONTyped,
|
||||
ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSON,
|
||||
ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSONTyped,
|
||||
} from './ControllerApiResourcesTargetsV1AuthorizeSessionArguments';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesTargetsV1TargetAliasAttributes
|
||||
*/
|
||||
export interface ControllerApiResourcesTargetsV1TargetAliasAttributes {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesTargetsV1AuthorizeSessionArguments}
|
||||
* @memberof ControllerApiResourcesTargetsV1TargetAliasAttributes
|
||||
*/
|
||||
authorizeSessionArguments?: ControllerApiResourcesTargetsV1AuthorizeSessionArguments;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesTargetsV1TargetAliasAttributes interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesTargetsV1TargetAliasAttributes(value: object): value is ControllerApiResourcesTargetsV1TargetAliasAttributes {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSON(json: any): ControllerApiResourcesTargetsV1TargetAliasAttributes {
|
||||
return ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1TargetAliasAttributesFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesTargetsV1TargetAliasAttributes {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'authorizeSessionArguments': json['authorize_session_arguments'] == null ? undefined : ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsFromJSON(json['authorize_session_arguments']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1TargetAliasAttributesToJSON(json: any): ControllerApiResourcesTargetsV1TargetAliasAttributes {
|
||||
return ControllerApiResourcesTargetsV1TargetAliasAttributesToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesTargetsV1TargetAliasAttributesToJSONTyped(value?: ControllerApiResourcesTargetsV1TargetAliasAttributes | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'authorize_session_arguments': ControllerApiResourcesTargetsV1AuthorizeSessionArgumentsToJSON(value['authorizeSessionArguments']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,71 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesUsersV1Account
|
||||
*/
|
||||
export interface ControllerApiResourcesUsersV1Account {
|
||||
/**
|
||||
* Output only. The ID of the Account.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesUsersV1Account
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* Output only. The Scope containing the Account.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesUsersV1Account
|
||||
*/
|
||||
readonly scopeId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesUsersV1Account interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesUsersV1Account(value: object): value is ControllerApiResourcesUsersV1Account {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesUsersV1AccountFromJSON(json: any): ControllerApiResourcesUsersV1Account {
|
||||
return ControllerApiResourcesUsersV1AccountFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesUsersV1AccountFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesUsersV1Account {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesUsersV1AccountToJSON(json: any): ControllerApiResourcesUsersV1Account {
|
||||
return ControllerApiResourcesUsersV1AccountToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesUsersV1AccountToJSONTyped(value?: Omit<ControllerApiResourcesUsersV1Account, 'id'|'scope_id'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,183 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesUsersV1Account } from './ControllerApiResourcesUsersV1Account';
|
||||
import {
|
||||
ControllerApiResourcesUsersV1AccountFromJSON,
|
||||
ControllerApiResourcesUsersV1AccountFromJSONTyped,
|
||||
ControllerApiResourcesUsersV1AccountToJSON,
|
||||
ControllerApiResourcesUsersV1AccountToJSONTyped,
|
||||
} from './ControllerApiResourcesUsersV1Account';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
export interface ControllerApiResourcesUsersV1User {
|
||||
/**
|
||||
* Output only. The ID of the User.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the Scope this resource is in.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* Output only. Contains the list of Account IDs linked to this User.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
readonly accountIds?: Array<string>;
|
||||
/**
|
||||
* Output only. The Accounts linked to this User.
|
||||
* @type {Array<ControllerApiResourcesUsersV1Account>}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
readonly accounts?: Array<ControllerApiResourcesUsersV1Account>;
|
||||
/**
|
||||
* Output only. The available actions on this resource for this user.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
readonly loginName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
readonly fullName?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
readonly email?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesUsersV1User
|
||||
*/
|
||||
readonly primaryAccountId?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesUsersV1User interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesUsersV1User(value: object): value is ControllerApiResourcesUsersV1User {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesUsersV1UserFromJSON(json: any): ControllerApiResourcesUsersV1User {
|
||||
return ControllerApiResourcesUsersV1UserFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesUsersV1UserFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesUsersV1User {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'accountIds': json['account_ids'] == null ? undefined : json['account_ids'],
|
||||
'accounts': json['accounts'] == null ? undefined : ((json['accounts'] as Array<any>).map(ControllerApiResourcesUsersV1AccountFromJSON)),
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
'loginName': json['login_name'] == null ? undefined : json['login_name'],
|
||||
'fullName': json['full_name'] == null ? undefined : json['full_name'],
|
||||
'email': json['email'] == null ? undefined : json['email'],
|
||||
'primaryAccountId': json['primary_account_id'] == null ? undefined : json['primary_account_id'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesUsersV1UserToJSON(json: any): ControllerApiResourcesUsersV1User {
|
||||
return ControllerApiResourcesUsersV1UserToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesUsersV1UserToJSONTyped(value?: Omit<ControllerApiResourcesUsersV1User, 'id'|'created_time'|'updated_time'|'account_ids'|'accounts'|'authorized_actions'|'login_name'|'full_name'|'email'|'primary_account_id'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesWorkersV1Certificate
|
||||
*/
|
||||
export interface ControllerApiResourcesWorkersV1Certificate {
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Certificate
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Certificate
|
||||
*/
|
||||
readonly publicKeySha256?: string;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesWorkersV1Certificate
|
||||
*/
|
||||
readonly notBeforeTime?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesWorkersV1Certificate
|
||||
*/
|
||||
readonly notAfterTime?: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesWorkersV1Certificate interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesWorkersV1Certificate(value: object): value is ControllerApiResourcesWorkersV1Certificate {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1CertificateFromJSON(json: any): ControllerApiResourcesWorkersV1Certificate {
|
||||
return ControllerApiResourcesWorkersV1CertificateFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1CertificateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesWorkersV1Certificate {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'publicKeySha256': json['public_key_sha256'] == null ? undefined : json['public_key_sha256'],
|
||||
'notBeforeTime': json['not_before_time'] == null ? undefined : (new Date(json['not_before_time'])),
|
||||
'notAfterTime': json['not_after_time'] == null ? undefined : (new Date(json['not_after_time'])),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1CertificateToJSON(json: any): ControllerApiResourcesWorkersV1Certificate {
|
||||
return ControllerApiResourcesWorkersV1CertificateToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1CertificateToJSONTyped(value?: Omit<ControllerApiResourcesWorkersV1Certificate, 'id'|'public_key_sha256'|'not_before_time'|'not_after_time'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesWorkersV1Certificate } from './ControllerApiResourcesWorkersV1Certificate';
|
||||
import {
|
||||
ControllerApiResourcesWorkersV1CertificateFromJSON,
|
||||
ControllerApiResourcesWorkersV1CertificateFromJSONTyped,
|
||||
ControllerApiResourcesWorkersV1CertificateToJSON,
|
||||
ControllerApiResourcesWorkersV1CertificateToJSONTyped,
|
||||
} from './ControllerApiResourcesWorkersV1Certificate';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesWorkersV1CertificateAuthority
|
||||
*/
|
||||
export interface ControllerApiResourcesWorkersV1CertificateAuthority {
|
||||
/**
|
||||
*
|
||||
* @type {Array<ControllerApiResourcesWorkersV1Certificate>}
|
||||
* @memberof ControllerApiResourcesWorkersV1CertificateAuthority
|
||||
*/
|
||||
certs?: Array<ControllerApiResourcesWorkersV1Certificate>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesWorkersV1CertificateAuthority interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesWorkersV1CertificateAuthority(value: object): value is ControllerApiResourcesWorkersV1CertificateAuthority {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1CertificateAuthorityFromJSON(json: any): ControllerApiResourcesWorkersV1CertificateAuthority {
|
||||
return ControllerApiResourcesWorkersV1CertificateAuthorityFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1CertificateAuthorityFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesWorkersV1CertificateAuthority {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'certs': json['certs'] == null ? undefined : ((json['certs'] as Array<any>).map(ControllerApiResourcesWorkersV1CertificateFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1CertificateAuthorityToJSON(json: any): ControllerApiResourcesWorkersV1CertificateAuthority {
|
||||
return ControllerApiResourcesWorkersV1CertificateAuthorityToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1CertificateAuthorityToJSONTyped(value?: ControllerApiResourcesWorkersV1CertificateAuthority | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'certs': value['certs'] == null ? undefined : ((value['certs'] as Array<any>).map(ControllerApiResourcesWorkersV1CertificateToJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
+81
@@ -0,0 +1,81 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesWorkersV1RemoteStoragePermissions
|
||||
*/
|
||||
export interface ControllerApiResourcesWorkersV1RemoteStoragePermissions {
|
||||
/**
|
||||
* Output only. The status of the write permission state for the given storage bucket.
|
||||
* Possible values are: unknown, error, and ok.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1RemoteStoragePermissions
|
||||
*/
|
||||
readonly write?: string;
|
||||
/**
|
||||
* Output only. The status of the read permission state for the given storage bucket.
|
||||
* Possible values are: unknown, error, and ok.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1RemoteStoragePermissions
|
||||
*/
|
||||
readonly read?: string;
|
||||
/**
|
||||
* Output only. The status of the delete permission state for the given storage bucket.
|
||||
* Possible values are: unknown, error, and ok.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1RemoteStoragePermissions
|
||||
*/
|
||||
readonly _delete?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesWorkersV1RemoteStoragePermissions interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesWorkersV1RemoteStoragePermissions(value: object): value is ControllerApiResourcesWorkersV1RemoteStoragePermissions {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSON(json: any): ControllerApiResourcesWorkersV1RemoteStoragePermissions {
|
||||
return ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesWorkersV1RemoteStoragePermissions {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'write': json['write'] == null ? undefined : json['write'],
|
||||
'read': json['read'] == null ? undefined : json['read'],
|
||||
'_delete': json['delete'] == null ? undefined : json['delete'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSON(json: any): ControllerApiResourcesWorkersV1RemoteStoragePermissions {
|
||||
return ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSONTyped(value?: Omit<ControllerApiResourcesWorkersV1RemoteStoragePermissions, 'write'|'read'|'delete'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,82 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesWorkersV1RemoteStoragePermissions } from './ControllerApiResourcesWorkersV1RemoteStoragePermissions';
|
||||
import {
|
||||
ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSON,
|
||||
ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSONTyped,
|
||||
ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSON,
|
||||
ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSONTyped,
|
||||
} from './ControllerApiResourcesWorkersV1RemoteStoragePermissions';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesWorkersV1RemoteStorageState
|
||||
*/
|
||||
export interface ControllerApiResourcesWorkersV1RemoteStorageState {
|
||||
/**
|
||||
* Output only. The overall health status of the storage bucket. The possible values include: error and available.
|
||||
* The status exists in an available state if each remote storage permission state does not have an error. An unknown remote
|
||||
* storage permission state does not affect the overall health status.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1RemoteStorageState
|
||||
*/
|
||||
readonly status?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesWorkersV1RemoteStoragePermissions}
|
||||
* @memberof ControllerApiResourcesWorkersV1RemoteStorageState
|
||||
*/
|
||||
permissions?: ControllerApiResourcesWorkersV1RemoteStoragePermissions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesWorkersV1RemoteStorageState interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesWorkersV1RemoteStorageState(value: object): value is ControllerApiResourcesWorkersV1RemoteStorageState {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1RemoteStorageStateFromJSON(json: any): ControllerApiResourcesWorkersV1RemoteStorageState {
|
||||
return ControllerApiResourcesWorkersV1RemoteStorageStateFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1RemoteStorageStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesWorkersV1RemoteStorageState {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'status': json['status'] == null ? undefined : json['status'],
|
||||
'permissions': json['permissions'] == null ? undefined : ControllerApiResourcesWorkersV1RemoteStoragePermissionsFromJSON(json['permissions']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1RemoteStorageStateToJSON(json: any): ControllerApiResourcesWorkersV1RemoteStorageState {
|
||||
return ControllerApiResourcesWorkersV1RemoteStorageStateToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1RemoteStorageStateToJSONTyped(value?: Omit<ControllerApiResourcesWorkersV1RemoteStorageState, 'status'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'permissions': ControllerApiResourcesWorkersV1RemoteStoragePermissionsToJSON(value['permissions']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,242 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesWorkersV1RemoteStorageState } from './ControllerApiResourcesWorkersV1RemoteStorageState';
|
||||
import {
|
||||
ControllerApiResourcesWorkersV1RemoteStorageStateFromJSON,
|
||||
ControllerApiResourcesWorkersV1RemoteStorageStateFromJSONTyped,
|
||||
ControllerApiResourcesWorkersV1RemoteStorageStateToJSON,
|
||||
ControllerApiResourcesWorkersV1RemoteStorageStateToJSONTyped,
|
||||
} from './ControllerApiResourcesWorkersV1RemoteStorageState';
|
||||
import type { ControllerApiResourcesScopesV1ScopeInfo } from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeInfoToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1ScopeInfo';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
export interface ControllerApiResourcesWorkersV1Worker {
|
||||
/**
|
||||
* Output only. The ID of the User.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly id?: string;
|
||||
/**
|
||||
* The ID of the Scope this resource is in.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
scopeId?: string;
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1ScopeInfo}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
scope?: ControllerApiResourcesScopesV1ScopeInfo;
|
||||
/**
|
||||
* Optional name for identification purposes. Can only be set through the API
|
||||
* for `pki`-type workers; read-only for `kms`-type workers.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
name?: string;
|
||||
/**
|
||||
* Optional user-set description for identification purposes. Can only be set
|
||||
* through the API for `pki`-type workers; read-only for `kms`-type workers.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
description?: string;
|
||||
/**
|
||||
* Output only. The time this resource was created.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly createdTime?: Date;
|
||||
/**
|
||||
* Output only. The time this resource was last updated.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly updatedTime?: Date;
|
||||
/**
|
||||
* Version is used in mutation requests, after the initial creation, to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* Output only. The address that this worker is reachable at, as sourced from
|
||||
* the worker's configuration file.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly address?: string;
|
||||
/**
|
||||
* Output only. The deduplicated union of the tags reported by the worker from
|
||||
* its configuration and any tags added through other means. This is used
|
||||
* when applying worker filters.
|
||||
* @type {{ [key: string]: Array<object>; }}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly canonicalTags?: { [key: string]: Array<object>; };
|
||||
/**
|
||||
* Output only. The tags set in the worker's configuration file.
|
||||
* @type {{ [key: string]: Array<object>; }}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly configTags?: { [key: string]: Array<object>; };
|
||||
/**
|
||||
* Output only. The time this worker daemon last reported its status.
|
||||
* @type {Date}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly lastStatusTime?: Date;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
workerGeneratedAuthToken?: string;
|
||||
/**
|
||||
* Output only. An activation token that can be given to a worker to correlate
|
||||
* it to the created resource.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly controllerGeneratedActivationToken?: string;
|
||||
/**
|
||||
* Output only. The number of connections that this worker is currently handling.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly activeConnectionCount?: number;
|
||||
/**
|
||||
* Output only. The type of the worker, denoted by how it authenticates: `pki`
|
||||
* or `kms`.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly type?: string;
|
||||
/**
|
||||
* Output only. The api tags set for the worker.
|
||||
* @type {{ [key: string]: Array<object>; }}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly apiTags?: { [key: string]: Array<object>; };
|
||||
/**
|
||||
* Output only. The version of the Boundary binary the worker is running.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly releaseVersion?: string;
|
||||
/**
|
||||
* Output only. The ids of the workers directly connected to this worker.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly directlyConnectedDownstreamWorkers?: Array<string>;
|
||||
/**
|
||||
* Output only. The available actions on this resource for the requester.
|
||||
* @type {Array<string>}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly authorizedActions?: Array<string>;
|
||||
/**
|
||||
*
|
||||
* @type {string}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly localStorageState?: string;
|
||||
/**
|
||||
* Output only. The remote_storage_state indicats the permission state of the storage buckets that the Worker
|
||||
* is actively using. The possible permission state types include: write, read, and delete. The possible
|
||||
* permission state values include: unknown, error, and ok.
|
||||
* @type {{ [key: string]: ControllerApiResourcesWorkersV1RemoteStorageState; }}
|
||||
* @memberof ControllerApiResourcesWorkersV1Worker
|
||||
*/
|
||||
readonly remoteStorageState?: { [key: string]: ControllerApiResourcesWorkersV1RemoteStorageState; };
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiResourcesWorkersV1Worker interface.
|
||||
*/
|
||||
export function instanceOfControllerApiResourcesWorkersV1Worker(value: object): value is ControllerApiResourcesWorkersV1Worker {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1WorkerFromJSON(json: any): ControllerApiResourcesWorkersV1Worker {
|
||||
return ControllerApiResourcesWorkersV1WorkerFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1WorkerFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiResourcesWorkersV1Worker {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'id': json['id'] == null ? undefined : json['id'],
|
||||
'scopeId': json['scope_id'] == null ? undefined : json['scope_id'],
|
||||
'scope': json['scope'] == null ? undefined : ControllerApiResourcesScopesV1ScopeInfoFromJSON(json['scope']),
|
||||
'name': json['name'] == null ? undefined : json['name'],
|
||||
'description': json['description'] == null ? undefined : json['description'],
|
||||
'createdTime': json['created_time'] == null ? undefined : (new Date(json['created_time'])),
|
||||
'updatedTime': json['updated_time'] == null ? undefined : (new Date(json['updated_time'])),
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'address': json['address'] == null ? undefined : json['address'],
|
||||
'canonicalTags': json['canonical_tags'] == null ? undefined : json['canonical_tags'],
|
||||
'configTags': json['config_tags'] == null ? undefined : json['config_tags'],
|
||||
'lastStatusTime': json['last_status_time'] == null ? undefined : (new Date(json['last_status_time'])),
|
||||
'workerGeneratedAuthToken': json['worker_generated_auth_token'] == null ? undefined : json['worker_generated_auth_token'],
|
||||
'controllerGeneratedActivationToken': json['controller_generated_activation_token'] == null ? undefined : json['controller_generated_activation_token'],
|
||||
'activeConnectionCount': json['active_connection_count'] == null ? undefined : json['active_connection_count'],
|
||||
'type': json['type'] == null ? undefined : json['type'],
|
||||
'apiTags': json['api_tags'] == null ? undefined : json['api_tags'],
|
||||
'releaseVersion': json['release_version'] == null ? undefined : json['release_version'],
|
||||
'directlyConnectedDownstreamWorkers': json['directly_connected_downstream_workers'] == null ? undefined : json['directly_connected_downstream_workers'],
|
||||
'authorizedActions': json['authorized_actions'] == null ? undefined : json['authorized_actions'],
|
||||
'localStorageState': json['local_storage_state'] == null ? undefined : json['local_storage_state'],
|
||||
'remoteStorageState': json['remote_storage_state'] == null ? undefined : (mapValues(json['remote_storage_state'], ControllerApiResourcesWorkersV1RemoteStorageStateFromJSON)),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1WorkerToJSON(json: any): ControllerApiResourcesWorkersV1Worker {
|
||||
return ControllerApiResourcesWorkersV1WorkerToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiResourcesWorkersV1WorkerToJSONTyped(value?: Omit<ControllerApiResourcesWorkersV1Worker, 'id'|'created_time'|'updated_time'|'address'|'canonical_tags'|'config_tags'|'last_status_time'|'controller_generated_activation_token'|'active_connection_count'|'type'|'api_tags'|'release_version'|'directly_connected_downstream_workers'|'authorized_actions'|'local_storage_state'|'remote_storage_state'> | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'scope_id': value['scopeId'],
|
||||
'scope': ControllerApiResourcesScopesV1ScopeInfoToJSON(value['scope']),
|
||||
'name': value['name'],
|
||||
'description': value['description'],
|
||||
'version': value['version'],
|
||||
'worker_generated_auth_token': value['workerGeneratedAuthToken'],
|
||||
};
|
||||
}
|
||||
|
||||
+82
@@ -0,0 +1,82 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AccountServiceChangePasswordBody
|
||||
*/
|
||||
export interface ControllerApiServicesV1AccountServiceChangePasswordBody {
|
||||
/**
|
||||
* Version is used to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiServicesV1AccountServiceChangePasswordBody
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The current password for the account.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiServicesV1AccountServiceChangePasswordBody
|
||||
*/
|
||||
currentPassword?: string;
|
||||
/**
|
||||
* The new password that should be set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiServicesV1AccountServiceChangePasswordBody
|
||||
*/
|
||||
newPassword?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AccountServiceChangePasswordBody interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AccountServiceChangePasswordBody(value: object): value is ControllerApiServicesV1AccountServiceChangePasswordBody {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AccountServiceChangePasswordBodyFromJSON(json: any): ControllerApiServicesV1AccountServiceChangePasswordBody {
|
||||
return ControllerApiServicesV1AccountServiceChangePasswordBodyFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AccountServiceChangePasswordBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AccountServiceChangePasswordBody {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'currentPassword': json['current_password'] == null ? undefined : json['current_password'],
|
||||
'newPassword': json['new_password'] == null ? undefined : json['new_password'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AccountServiceChangePasswordBodyToJSON(json: any): ControllerApiServicesV1AccountServiceChangePasswordBody {
|
||||
return ControllerApiServicesV1AccountServiceChangePasswordBodyToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AccountServiceChangePasswordBodyToJSONTyped(value?: ControllerApiServicesV1AccountServiceChangePasswordBody | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'version': value['version'],
|
||||
'current_password': value['currentPassword'],
|
||||
'new_password': value['newPassword'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,74 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AccountServiceSetPasswordBody
|
||||
*/
|
||||
export interface ControllerApiServicesV1AccountServiceSetPasswordBody {
|
||||
/**
|
||||
* Version is used to ensure this resource has not changed.
|
||||
* The mutation will fail if the version does not match the latest known good version.
|
||||
* @type {number}
|
||||
* @memberof ControllerApiServicesV1AccountServiceSetPasswordBody
|
||||
*/
|
||||
version?: number;
|
||||
/**
|
||||
* The password that should be set.
|
||||
* @type {string}
|
||||
* @memberof ControllerApiServicesV1AccountServiceSetPasswordBody
|
||||
*/
|
||||
password?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AccountServiceSetPasswordBody interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AccountServiceSetPasswordBody(value: object): value is ControllerApiServicesV1AccountServiceSetPasswordBody {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AccountServiceSetPasswordBodyFromJSON(json: any): ControllerApiServicesV1AccountServiceSetPasswordBody {
|
||||
return ControllerApiServicesV1AccountServiceSetPasswordBodyFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AccountServiceSetPasswordBodyFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AccountServiceSetPasswordBody {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'version': json['version'] == null ? undefined : json['version'],
|
||||
'password': json['password'] == null ? undefined : json['password'],
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AccountServiceSetPasswordBodyToJSON(json: any): ControllerApiServicesV1AccountServiceSetPasswordBody {
|
||||
return ControllerApiServicesV1AccountServiceSetPasswordBodyToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AccountServiceSetPasswordBodyToJSONTyped(value?: ControllerApiServicesV1AccountServiceSetPasswordBody | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'version': value['version'],
|
||||
'password': value['password'],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesGroupsV1Group } from './ControllerApiResourcesGroupsV1Group';
|
||||
import {
|
||||
ControllerApiResourcesGroupsV1GroupFromJSON,
|
||||
ControllerApiResourcesGroupsV1GroupFromJSONTyped,
|
||||
ControllerApiResourcesGroupsV1GroupToJSON,
|
||||
ControllerApiResourcesGroupsV1GroupToJSONTyped,
|
||||
} from './ControllerApiResourcesGroupsV1Group';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AddGroupMembersResponse
|
||||
*/
|
||||
export interface ControllerApiServicesV1AddGroupMembersResponse {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesGroupsV1Group}
|
||||
* @memberof ControllerApiServicesV1AddGroupMembersResponse
|
||||
*/
|
||||
item?: ControllerApiResourcesGroupsV1Group;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AddGroupMembersResponse interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AddGroupMembersResponse(value: object): value is ControllerApiServicesV1AddGroupMembersResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddGroupMembersResponseFromJSON(json: any): ControllerApiServicesV1AddGroupMembersResponse {
|
||||
return ControllerApiServicesV1AddGroupMembersResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddGroupMembersResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddGroupMembersResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'item': json['item'] == null ? undefined : ControllerApiResourcesGroupsV1GroupFromJSON(json['item']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddGroupMembersResponseToJSON(json: any): ControllerApiServicesV1AddGroupMembersResponse {
|
||||
return ControllerApiServicesV1AddGroupMembersResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddGroupMembersResponseToJSONTyped(value?: ControllerApiServicesV1AddGroupMembersResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'item': ControllerApiResourcesGroupsV1GroupToJSON(value['item']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesHostsetsV1HostSet } from './ControllerApiResourcesHostsetsV1HostSet';
|
||||
import {
|
||||
ControllerApiResourcesHostsetsV1HostSetFromJSON,
|
||||
ControllerApiResourcesHostsetsV1HostSetFromJSONTyped,
|
||||
ControllerApiResourcesHostsetsV1HostSetToJSON,
|
||||
ControllerApiResourcesHostsetsV1HostSetToJSONTyped,
|
||||
} from './ControllerApiResourcesHostsetsV1HostSet';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AddHostSetHostsResponse
|
||||
*/
|
||||
export interface ControllerApiServicesV1AddHostSetHostsResponse {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesHostsetsV1HostSet}
|
||||
* @memberof ControllerApiServicesV1AddHostSetHostsResponse
|
||||
*/
|
||||
item?: ControllerApiResourcesHostsetsV1HostSet;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AddHostSetHostsResponse interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AddHostSetHostsResponse(value: object): value is ControllerApiServicesV1AddHostSetHostsResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddHostSetHostsResponseFromJSON(json: any): ControllerApiServicesV1AddHostSetHostsResponse {
|
||||
return ControllerApiServicesV1AddHostSetHostsResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddHostSetHostsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddHostSetHostsResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'item': json['item'] == null ? undefined : ControllerApiResourcesHostsetsV1HostSetFromJSON(json['item']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddHostSetHostsResponseToJSON(json: any): ControllerApiServicesV1AddHostSetHostsResponse {
|
||||
return ControllerApiServicesV1AddHostSetHostsResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddHostSetHostsResponseToJSONTyped(value?: ControllerApiServicesV1AddHostSetHostsResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'item': ControllerApiResourcesHostsetsV1HostSetToJSON(value['item']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role';
|
||||
import {
|
||||
ControllerApiResourcesRolesV1RoleFromJSON,
|
||||
ControllerApiResourcesRolesV1RoleFromJSONTyped,
|
||||
ControllerApiResourcesRolesV1RoleToJSON,
|
||||
ControllerApiResourcesRolesV1RoleToJSONTyped,
|
||||
} from './ControllerApiResourcesRolesV1Role';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AddRoleGrantScopesResponse
|
||||
*/
|
||||
export interface ControllerApiServicesV1AddRoleGrantScopesResponse {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesRolesV1Role}
|
||||
* @memberof ControllerApiServicesV1AddRoleGrantScopesResponse
|
||||
*/
|
||||
item?: ControllerApiResourcesRolesV1Role;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AddRoleGrantScopesResponse interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AddRoleGrantScopesResponse(value: object): value is ControllerApiServicesV1AddRoleGrantScopesResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRoleGrantScopesResponseFromJSON(json: any): ControllerApiServicesV1AddRoleGrantScopesResponse {
|
||||
return ControllerApiServicesV1AddRoleGrantScopesResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRoleGrantScopesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddRoleGrantScopesResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRoleGrantScopesResponseToJSON(json: any): ControllerApiServicesV1AddRoleGrantScopesResponse {
|
||||
return ControllerApiServicesV1AddRoleGrantScopesResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRoleGrantScopesResponseToJSONTyped(value?: ControllerApiServicesV1AddRoleGrantScopesResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role';
|
||||
import {
|
||||
ControllerApiResourcesRolesV1RoleFromJSON,
|
||||
ControllerApiResourcesRolesV1RoleFromJSONTyped,
|
||||
ControllerApiResourcesRolesV1RoleToJSON,
|
||||
ControllerApiResourcesRolesV1RoleToJSONTyped,
|
||||
} from './ControllerApiResourcesRolesV1Role';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AddRoleGrantsResponse
|
||||
*/
|
||||
export interface ControllerApiServicesV1AddRoleGrantsResponse {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesRolesV1Role}
|
||||
* @memberof ControllerApiServicesV1AddRoleGrantsResponse
|
||||
*/
|
||||
item?: ControllerApiResourcesRolesV1Role;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AddRoleGrantsResponse interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AddRoleGrantsResponse(value: object): value is ControllerApiServicesV1AddRoleGrantsResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRoleGrantsResponseFromJSON(json: any): ControllerApiServicesV1AddRoleGrantsResponse {
|
||||
return ControllerApiServicesV1AddRoleGrantsResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRoleGrantsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddRoleGrantsResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRoleGrantsResponseToJSON(json: any): ControllerApiServicesV1AddRoleGrantsResponse {
|
||||
return ControllerApiServicesV1AddRoleGrantsResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRoleGrantsResponseToJSONTyped(value?: ControllerApiServicesV1AddRoleGrantsResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesRolesV1Role } from './ControllerApiResourcesRolesV1Role';
|
||||
import {
|
||||
ControllerApiResourcesRolesV1RoleFromJSON,
|
||||
ControllerApiResourcesRolesV1RoleFromJSONTyped,
|
||||
ControllerApiResourcesRolesV1RoleToJSON,
|
||||
ControllerApiResourcesRolesV1RoleToJSONTyped,
|
||||
} from './ControllerApiResourcesRolesV1Role';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AddRolePrincipalsResponse
|
||||
*/
|
||||
export interface ControllerApiServicesV1AddRolePrincipalsResponse {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesRolesV1Role}
|
||||
* @memberof ControllerApiServicesV1AddRolePrincipalsResponse
|
||||
*/
|
||||
item?: ControllerApiResourcesRolesV1Role;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AddRolePrincipalsResponse interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AddRolePrincipalsResponse(value: object): value is ControllerApiServicesV1AddRolePrincipalsResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRolePrincipalsResponseFromJSON(json: any): ControllerApiServicesV1AddRolePrincipalsResponse {
|
||||
return ControllerApiServicesV1AddRolePrincipalsResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRolePrincipalsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddRolePrincipalsResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'item': json['item'] == null ? undefined : ControllerApiResourcesRolesV1RoleFromJSON(json['item']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRolePrincipalsResponseToJSON(json: any): ControllerApiServicesV1AddRolePrincipalsResponse {
|
||||
return ControllerApiServicesV1AddRolePrincipalsResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddRolePrincipalsResponseToJSONTyped(value?: ControllerApiServicesV1AddRolePrincipalsResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'item': ControllerApiResourcesRolesV1RoleToJSON(value['item']),
|
||||
};
|
||||
}
|
||||
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1TargetFromJSON,
|
||||
ControllerApiResourcesTargetsV1TargetFromJSONTyped,
|
||||
ControllerApiResourcesTargetsV1TargetToJSON,
|
||||
ControllerApiResourcesTargetsV1TargetToJSONTyped,
|
||||
} from './ControllerApiResourcesTargetsV1Target';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AddTargetCredentialSourcesResponse
|
||||
*/
|
||||
export interface ControllerApiServicesV1AddTargetCredentialSourcesResponse {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesTargetsV1Target}
|
||||
* @memberof ControllerApiServicesV1AddTargetCredentialSourcesResponse
|
||||
*/
|
||||
item?: ControllerApiResourcesTargetsV1Target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AddTargetCredentialSourcesResponse interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AddTargetCredentialSourcesResponse(value: object): value is ControllerApiServicesV1AddTargetCredentialSourcesResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddTargetCredentialSourcesResponseFromJSON(json: any): ControllerApiServicesV1AddTargetCredentialSourcesResponse {
|
||||
return ControllerApiServicesV1AddTargetCredentialSourcesResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddTargetCredentialSourcesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddTargetCredentialSourcesResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddTargetCredentialSourcesResponseToJSON(json: any): ControllerApiServicesV1AddTargetCredentialSourcesResponse {
|
||||
return ControllerApiServicesV1AddTargetCredentialSourcesResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddTargetCredentialSourcesResponseToJSONTyped(value?: ControllerApiServicesV1AddTargetCredentialSourcesResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesTargetsV1Target } from './ControllerApiResourcesTargetsV1Target';
|
||||
import {
|
||||
ControllerApiResourcesTargetsV1TargetFromJSON,
|
||||
ControllerApiResourcesTargetsV1TargetFromJSONTyped,
|
||||
ControllerApiResourcesTargetsV1TargetToJSON,
|
||||
ControllerApiResourcesTargetsV1TargetToJSONTyped,
|
||||
} from './ControllerApiResourcesTargetsV1Target';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AddTargetHostSourcesResponse
|
||||
*/
|
||||
export interface ControllerApiServicesV1AddTargetHostSourcesResponse {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesTargetsV1Target}
|
||||
* @memberof ControllerApiServicesV1AddTargetHostSourcesResponse
|
||||
*/
|
||||
item?: ControllerApiResourcesTargetsV1Target;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AddTargetHostSourcesResponse interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AddTargetHostSourcesResponse(value: object): value is ControllerApiServicesV1AddTargetHostSourcesResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddTargetHostSourcesResponseFromJSON(json: any): ControllerApiServicesV1AddTargetHostSourcesResponse {
|
||||
return ControllerApiServicesV1AddTargetHostSourcesResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddTargetHostSourcesResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddTargetHostSourcesResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'item': json['item'] == null ? undefined : ControllerApiResourcesTargetsV1TargetFromJSON(json['item']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddTargetHostSourcesResponseToJSON(json: any): ControllerApiServicesV1AddTargetHostSourcesResponse {
|
||||
return ControllerApiServicesV1AddTargetHostSourcesResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddTargetHostSourcesResponseToJSONTyped(value?: ControllerApiServicesV1AddTargetHostSourcesResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'item': ControllerApiResourcesTargetsV1TargetToJSON(value['item']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesUsersV1User } from './ControllerApiResourcesUsersV1User';
|
||||
import {
|
||||
ControllerApiResourcesUsersV1UserFromJSON,
|
||||
ControllerApiResourcesUsersV1UserFromJSONTyped,
|
||||
ControllerApiResourcesUsersV1UserToJSON,
|
||||
ControllerApiResourcesUsersV1UserToJSONTyped,
|
||||
} from './ControllerApiResourcesUsersV1User';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AddUserAccountsResponse
|
||||
*/
|
||||
export interface ControllerApiServicesV1AddUserAccountsResponse {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesUsersV1User}
|
||||
* @memberof ControllerApiServicesV1AddUserAccountsResponse
|
||||
*/
|
||||
item?: ControllerApiResourcesUsersV1User;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AddUserAccountsResponse interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AddUserAccountsResponse(value: object): value is ControllerApiServicesV1AddUserAccountsResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddUserAccountsResponseFromJSON(json: any): ControllerApiServicesV1AddUserAccountsResponse {
|
||||
return ControllerApiServicesV1AddUserAccountsResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddUserAccountsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddUserAccountsResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'item': json['item'] == null ? undefined : ControllerApiResourcesUsersV1UserFromJSON(json['item']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddUserAccountsResponseToJSON(json: any): ControllerApiServicesV1AddUserAccountsResponse {
|
||||
return ControllerApiServicesV1AddUserAccountsResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddUserAccountsResponseToJSONTyped(value?: ControllerApiServicesV1AddUserAccountsResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'item': ControllerApiResourcesUsersV1UserToJSON(value['item']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesWorkersV1Worker } from './ControllerApiResourcesWorkersV1Worker';
|
||||
import {
|
||||
ControllerApiResourcesWorkersV1WorkerFromJSON,
|
||||
ControllerApiResourcesWorkersV1WorkerFromJSONTyped,
|
||||
ControllerApiResourcesWorkersV1WorkerToJSON,
|
||||
ControllerApiResourcesWorkersV1WorkerToJSONTyped,
|
||||
} from './ControllerApiResourcesWorkersV1Worker';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AddWorkerTagsResponse
|
||||
*/
|
||||
export interface ControllerApiServicesV1AddWorkerTagsResponse {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesWorkersV1Worker}
|
||||
* @memberof ControllerApiServicesV1AddWorkerTagsResponse
|
||||
*/
|
||||
item?: ControllerApiResourcesWorkersV1Worker;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AddWorkerTagsResponse interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AddWorkerTagsResponse(value: object): value is ControllerApiServicesV1AddWorkerTagsResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddWorkerTagsResponseFromJSON(json: any): ControllerApiServicesV1AddWorkerTagsResponse {
|
||||
return ControllerApiServicesV1AddWorkerTagsResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddWorkerTagsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AddWorkerTagsResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'item': json['item'] == null ? undefined : ControllerApiResourcesWorkersV1WorkerFromJSON(json['item']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddWorkerTagsResponseToJSON(json: any): ControllerApiServicesV1AddWorkerTagsResponse {
|
||||
return ControllerApiServicesV1AddWorkerTagsResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AddWorkerTagsResponseToJSONTyped(value?: ControllerApiServicesV1AddWorkerTagsResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'item': ControllerApiResourcesWorkersV1WorkerToJSON(value['item']),
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
/**
|
||||
* Boundary controller HTTP API
|
||||
* Welcome to the Boundary controller HTTP API documentation. This page provides a reference guide for using the Boundary controller API, a JSON-based HTTP API. The API implements commonly seen HTTP API patterns for status codes, paths, and errors. See the [API overview](https://developer.hashicorp.com/boundary/docs/api-clients/api) for more information. Before you read this page, it is useful to understand Boundary\'s [domain model](https://developer.hashicorp.com/boundary/docs/concepts/domain-model) and to be aware of the terminology used here. To get started, search for the service you want to interact with in the sidebar to the left. Each resource in Boundary, such as accounts and credential stores, has its own service. Each service contains all the API endpoints for the resource. ## Status codes - `2XX`: Boundary returns a code between `200` and `299` on success. Generally this is `200`, but implementations should be prepared to accept any `2XX` status code as indicating success. If a call returns a `2XX` code that is not `200`, it follows well-understood semantics for those status codes. - `400`: Boundary returns `400` when a command cannot be completed due to invalid user input, except for a properly-formatted identifier that does not map to an existing resource, which returns a `404` as discussed below. - `401`: Boundary returns `401` if no authentication token is provided or if the provided token is invalid. A valid token that simply does not have permission for a resource returns a `403` instead. A token that is invalid or missing, but where the anonymous user (`u_anon`) is able to successfully perform the action, will not return a `401` but instead will return the result of the action. - `403`: Boundary returns `403` if a provided token was valid but does not have the grants required to perform the requested action. - `404`: Boundary returns `404` if a resource cannot be found. Note that this happens _prior_ to authentication/authorization checking in nearly all cases as the resource information (such as its scope, available actions, etc.) is a required part of that check. As a result, an action against a resource that does not exist returns a `404` instead of a `401` or `403`. While this could be considered an information leak, since IDs are randomly generated and this only discloses whether an ID is valid, it\'s tolerable as it allows for far simpler and more robust client implementation. - `405`: Boundary returns a `405` to indicate that the method (HTTP verb or custom action) is not implemented for the given resource. - `429`: Boundary returns a `429` if any of the API rate limit quotas have been exhausted for the resource and action. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. - `500`: Boundary returns `500` if an error occurred that is not (directly) tied to invalid user input. If a `500` is generated, information about the error is logged to Boundary\'s server log but is not generally provided to the client. - `503`: Boundary returns a `503` if it is unable to store a quota due to the API rate limit being exceeded. It includes the `Retry-After` header so that the client knows how long to wait before making a new request. ## List pagination Boundary uses [API pagination](https://developer.hashicorp.com/boundary/docs/api-clients/api/pagination) to support searching and filtering large lists of results efficiently.
|
||||
*
|
||||
* The version of the OpenAPI document: 0.19.0
|
||||
*
|
||||
*
|
||||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||||
* https://openapi-generator.tech
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
import { mapValues } from '../runtime';
|
||||
import type { ControllerApiResourcesScopesV1Scope } from './ControllerApiResourcesScopesV1Scope';
|
||||
import {
|
||||
ControllerApiResourcesScopesV1ScopeFromJSON,
|
||||
ControllerApiResourcesScopesV1ScopeFromJSONTyped,
|
||||
ControllerApiResourcesScopesV1ScopeToJSON,
|
||||
ControllerApiResourcesScopesV1ScopeToJSONTyped,
|
||||
} from './ControllerApiResourcesScopesV1Scope';
|
||||
|
||||
/**
|
||||
*
|
||||
* @export
|
||||
* @interface ControllerApiServicesV1AttachStoragePolicyResponse
|
||||
*/
|
||||
export interface ControllerApiServicesV1AttachStoragePolicyResponse {
|
||||
/**
|
||||
*
|
||||
* @type {ControllerApiResourcesScopesV1Scope}
|
||||
* @memberof ControllerApiServicesV1AttachStoragePolicyResponse
|
||||
*/
|
||||
item?: ControllerApiResourcesScopesV1Scope;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a given object implements the ControllerApiServicesV1AttachStoragePolicyResponse interface.
|
||||
*/
|
||||
export function instanceOfControllerApiServicesV1AttachStoragePolicyResponse(value: object): value is ControllerApiServicesV1AttachStoragePolicyResponse {
|
||||
return true;
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AttachStoragePolicyResponseFromJSON(json: any): ControllerApiServicesV1AttachStoragePolicyResponse {
|
||||
return ControllerApiServicesV1AttachStoragePolicyResponseFromJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AttachStoragePolicyResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): ControllerApiServicesV1AttachStoragePolicyResponse {
|
||||
if (json == null) {
|
||||
return json;
|
||||
}
|
||||
return {
|
||||
|
||||
'item': json['item'] == null ? undefined : ControllerApiResourcesScopesV1ScopeFromJSON(json['item']),
|
||||
};
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AttachStoragePolicyResponseToJSON(json: any): ControllerApiServicesV1AttachStoragePolicyResponse {
|
||||
return ControllerApiServicesV1AttachStoragePolicyResponseToJSONTyped(json, false);
|
||||
}
|
||||
|
||||
export function ControllerApiServicesV1AttachStoragePolicyResponseToJSONTyped(value?: ControllerApiServicesV1AttachStoragePolicyResponse | null, ignoreDiscriminator: boolean = false): any {
|
||||
if (value == null) {
|
||||
return value;
|
||||
}
|
||||
|
||||
return {
|
||||
|
||||
'item': ControllerApiResourcesScopesV1ScopeToJSON(value['item']),
|
||||
};
|
||||
}
|
||||
|
||||
Loaded 100 of 262 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user