@datadog/datadog-api-client
Version:
OpenAPI client for Datadog APIs
530 lines (529 loc) • 24.4 kB
TypeScript
import { BaseAPIRequestFactory } from "../../datadog-api-client-common/baseapi";
import { Configuration } from "../../datadog-api-client-common/configuration";
import { RequestContext, ResponseContext } from "../../datadog-api-client-common/http/http";
import { OrgGroupCreateRequest } from "../models/OrgGroupCreateRequest";
import { OrgGroupListResponse } from "../models/OrgGroupListResponse";
import { OrgGroupMembershipBulkUpdateRequest } from "../models/OrgGroupMembershipBulkUpdateRequest";
import { OrgGroupMembershipListResponse } from "../models/OrgGroupMembershipListResponse";
import { OrgGroupMembershipResponse } from "../models/OrgGroupMembershipResponse";
import { OrgGroupMembershipSortOption } from "../models/OrgGroupMembershipSortOption";
import { OrgGroupMembershipUpdateRequest } from "../models/OrgGroupMembershipUpdateRequest";
import { OrgGroupPolicyConfigListResponse } from "../models/OrgGroupPolicyConfigListResponse";
import { OrgGroupPolicyCreateRequest } from "../models/OrgGroupPolicyCreateRequest";
import { OrgGroupPolicyListResponse } from "../models/OrgGroupPolicyListResponse";
import { OrgGroupPolicyOverrideCreateRequest } from "../models/OrgGroupPolicyOverrideCreateRequest";
import { OrgGroupPolicyOverrideListResponse } from "../models/OrgGroupPolicyOverrideListResponse";
import { OrgGroupPolicyOverrideResponse } from "../models/OrgGroupPolicyOverrideResponse";
import { OrgGroupPolicyOverrideSortOption } from "../models/OrgGroupPolicyOverrideSortOption";
import { OrgGroupPolicyOverrideUpdateRequest } from "../models/OrgGroupPolicyOverrideUpdateRequest";
import { OrgGroupPolicyResponse } from "../models/OrgGroupPolicyResponse";
import { OrgGroupPolicySortOption } from "../models/OrgGroupPolicySortOption";
import { OrgGroupPolicyUpdateRequest } from "../models/OrgGroupPolicyUpdateRequest";
import { OrgGroupResponse } from "../models/OrgGroupResponse";
import { OrgGroupSortOption } from "../models/OrgGroupSortOption";
import { OrgGroupUpdateRequest } from "../models/OrgGroupUpdateRequest";
export declare class OrgGroupsApiRequestFactory extends BaseAPIRequestFactory {
bulkUpdateOrgGroupMemberships(body: OrgGroupMembershipBulkUpdateRequest, _options?: Configuration): Promise<RequestContext>;
createOrgGroup(body: OrgGroupCreateRequest, _options?: Configuration): Promise<RequestContext>;
createOrgGroupPolicy(body: OrgGroupPolicyCreateRequest, _options?: Configuration): Promise<RequestContext>;
createOrgGroupPolicyOverride(body: OrgGroupPolicyOverrideCreateRequest, _options?: Configuration): Promise<RequestContext>;
deleteOrgGroup(orgGroupId: string, _options?: Configuration): Promise<RequestContext>;
deleteOrgGroupPolicy(orgGroupPolicyId: string, _options?: Configuration): Promise<RequestContext>;
deleteOrgGroupPolicyOverride(orgGroupPolicyOverrideId: string, _options?: Configuration): Promise<RequestContext>;
getOrgGroup(orgGroupId: string, _options?: Configuration): Promise<RequestContext>;
getOrgGroupMembership(orgGroupMembershipId: string, _options?: Configuration): Promise<RequestContext>;
getOrgGroupPolicy(orgGroupPolicyId: string, _options?: Configuration): Promise<RequestContext>;
getOrgGroupPolicyOverride(orgGroupPolicyOverrideId: string, _options?: Configuration): Promise<RequestContext>;
listOrgGroupMemberships(filterOrgGroupId?: string, filterOrgUuid?: string, pageNumber?: number, pageSize?: number, sort?: OrgGroupMembershipSortOption, _options?: Configuration): Promise<RequestContext>;
listOrgGroupPolicies(filterOrgGroupId: string, filterPolicyName?: string, pageNumber?: number, pageSize?: number, sort?: OrgGroupPolicySortOption, _options?: Configuration): Promise<RequestContext>;
listOrgGroupPolicyConfigs(_options?: Configuration): Promise<RequestContext>;
listOrgGroupPolicyOverrides(filterOrgGroupId: string, filterPolicyId?: string, pageNumber?: number, pageSize?: number, sort?: OrgGroupPolicyOverrideSortOption, _options?: Configuration): Promise<RequestContext>;
listOrgGroups(pageNumber?: number, pageSize?: number, sort?: OrgGroupSortOption, _options?: Configuration): Promise<RequestContext>;
updateOrgGroup(orgGroupId: string, body: OrgGroupUpdateRequest, _options?: Configuration): Promise<RequestContext>;
updateOrgGroupMembership(orgGroupMembershipId: string, body: OrgGroupMembershipUpdateRequest, _options?: Configuration): Promise<RequestContext>;
updateOrgGroupPolicy(orgGroupPolicyId: string, body: OrgGroupPolicyUpdateRequest, _options?: Configuration): Promise<RequestContext>;
updateOrgGroupPolicyOverride(orgGroupPolicyOverrideId: string, body: OrgGroupPolicyOverrideUpdateRequest, _options?: Configuration): Promise<RequestContext>;
}
export declare class OrgGroupsApiResponseProcessor {
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to bulkUpdateOrgGroupMemberships
* @throws ApiException if the response code was not in [200, 299]
*/
bulkUpdateOrgGroupMemberships(response: ResponseContext): Promise<OrgGroupMembershipListResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to createOrgGroup
* @throws ApiException if the response code was not in [200, 299]
*/
createOrgGroup(response: ResponseContext): Promise<OrgGroupResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to createOrgGroupPolicy
* @throws ApiException if the response code was not in [200, 299]
*/
createOrgGroupPolicy(response: ResponseContext): Promise<OrgGroupPolicyResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to createOrgGroupPolicyOverride
* @throws ApiException if the response code was not in [200, 299]
*/
createOrgGroupPolicyOverride(response: ResponseContext): Promise<OrgGroupPolicyOverrideResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to deleteOrgGroup
* @throws ApiException if the response code was not in [200, 299]
*/
deleteOrgGroup(response: ResponseContext): Promise<void>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to deleteOrgGroupPolicy
* @throws ApiException if the response code was not in [200, 299]
*/
deleteOrgGroupPolicy(response: ResponseContext): Promise<void>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to deleteOrgGroupPolicyOverride
* @throws ApiException if the response code was not in [200, 299]
*/
deleteOrgGroupPolicyOverride(response: ResponseContext): Promise<void>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getOrgGroup
* @throws ApiException if the response code was not in [200, 299]
*/
getOrgGroup(response: ResponseContext): Promise<OrgGroupResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getOrgGroupMembership
* @throws ApiException if the response code was not in [200, 299]
*/
getOrgGroupMembership(response: ResponseContext): Promise<OrgGroupMembershipResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getOrgGroupPolicy
* @throws ApiException if the response code was not in [200, 299]
*/
getOrgGroupPolicy(response: ResponseContext): Promise<OrgGroupPolicyResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to getOrgGroupPolicyOverride
* @throws ApiException if the response code was not in [200, 299]
*/
getOrgGroupPolicyOverride(response: ResponseContext): Promise<OrgGroupPolicyOverrideResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listOrgGroupMemberships
* @throws ApiException if the response code was not in [200, 299]
*/
listOrgGroupMemberships(response: ResponseContext): Promise<OrgGroupMembershipListResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listOrgGroupPolicies
* @throws ApiException if the response code was not in [200, 299]
*/
listOrgGroupPolicies(response: ResponseContext): Promise<OrgGroupPolicyListResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listOrgGroupPolicyConfigs
* @throws ApiException if the response code was not in [200, 299]
*/
listOrgGroupPolicyConfigs(response: ResponseContext): Promise<OrgGroupPolicyConfigListResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listOrgGroupPolicyOverrides
* @throws ApiException if the response code was not in [200, 299]
*/
listOrgGroupPolicyOverrides(response: ResponseContext): Promise<OrgGroupPolicyOverrideListResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to listOrgGroups
* @throws ApiException if the response code was not in [200, 299]
*/
listOrgGroups(response: ResponseContext): Promise<OrgGroupListResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to updateOrgGroup
* @throws ApiException if the response code was not in [200, 299]
*/
updateOrgGroup(response: ResponseContext): Promise<OrgGroupResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to updateOrgGroupMembership
* @throws ApiException if the response code was not in [200, 299]
*/
updateOrgGroupMembership(response: ResponseContext): Promise<OrgGroupMembershipResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to updateOrgGroupPolicy
* @throws ApiException if the response code was not in [200, 299]
*/
updateOrgGroupPolicy(response: ResponseContext): Promise<OrgGroupPolicyResponse>;
/**
* Unwraps the actual response sent by the server from the response context and deserializes the response content
* to the expected objects
*
* @params response Response returned by the server for a request to updateOrgGroupPolicyOverride
* @throws ApiException if the response code was not in [200, 299]
*/
updateOrgGroupPolicyOverride(response: ResponseContext): Promise<OrgGroupPolicyOverrideResponse>;
}
export interface OrgGroupsApiBulkUpdateOrgGroupMembershipsRequest {
/**
* @type OrgGroupMembershipBulkUpdateRequest
*/
body: OrgGroupMembershipBulkUpdateRequest;
}
export interface OrgGroupsApiCreateOrgGroupRequest {
/**
* @type OrgGroupCreateRequest
*/
body: OrgGroupCreateRequest;
}
export interface OrgGroupsApiCreateOrgGroupPolicyRequest {
/**
* @type OrgGroupPolicyCreateRequest
*/
body: OrgGroupPolicyCreateRequest;
}
export interface OrgGroupsApiCreateOrgGroupPolicyOverrideRequest {
/**
* @type OrgGroupPolicyOverrideCreateRequest
*/
body: OrgGroupPolicyOverrideCreateRequest;
}
export interface OrgGroupsApiDeleteOrgGroupRequest {
/**
* The ID of the org group.
* @type string
*/
orgGroupId: string;
}
export interface OrgGroupsApiDeleteOrgGroupPolicyRequest {
/**
* The ID of the org group policy.
* @type string
*/
orgGroupPolicyId: string;
}
export interface OrgGroupsApiDeleteOrgGroupPolicyOverrideRequest {
/**
* The ID of the org group policy override.
* @type string
*/
orgGroupPolicyOverrideId: string;
}
export interface OrgGroupsApiGetOrgGroupRequest {
/**
* The ID of the org group.
* @type string
*/
orgGroupId: string;
}
export interface OrgGroupsApiGetOrgGroupMembershipRequest {
/**
* The ID of the org group membership.
* @type string
*/
orgGroupMembershipId: string;
}
export interface OrgGroupsApiGetOrgGroupPolicyRequest {
/**
* The ID of the org group policy.
* @type string
*/
orgGroupPolicyId: string;
}
export interface OrgGroupsApiGetOrgGroupPolicyOverrideRequest {
/**
* The ID of the org group policy override.
* @type string
*/
orgGroupPolicyOverrideId: string;
}
export interface OrgGroupsApiListOrgGroupMembershipsRequest {
/**
* Filter memberships by org group ID. Required when `filter[org_uuid]` is not provided.
* @type string
*/
filterOrgGroupId?: string;
/**
* Filter memberships by org UUID. Returns a single-item list.
* @type string
*/
filterOrgUuid?: string;
/**
* The page number to return.
* @type number
*/
pageNumber?: number;
/**
* The number of items per page. Maximum is 1000.
* @type number
*/
pageSize?: number;
/**
* Field to sort memberships by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`.
* @type OrgGroupMembershipSortOption
*/
sort?: OrgGroupMembershipSortOption;
}
export interface OrgGroupsApiListOrgGroupPoliciesRequest {
/**
* Filter policies by org group ID.
* @type string
*/
filterOrgGroupId: string;
/**
* Filter policies by policy name.
* @type string
*/
filterPolicyName?: string;
/**
* The page number to return.
* @type number
*/
pageNumber?: number;
/**
* The number of items per page. Maximum is 1000.
* @type number
*/
pageSize?: number;
/**
* Field to sort policies by. Supported values: `id`, `name`, `-id`, `-name`. Defaults to `id`.
* @type OrgGroupPolicySortOption
*/
sort?: OrgGroupPolicySortOption;
}
export interface OrgGroupsApiListOrgGroupPolicyOverridesRequest {
/**
* Filter policy overrides by org group ID.
* @type string
*/
filterOrgGroupId: string;
/**
* Filter policy overrides by policy ID.
* @type string
*/
filterPolicyId?: string;
/**
* The page number to return.
* @type number
*/
pageNumber?: number;
/**
* The number of items per page. Maximum is 1000.
* @type number
*/
pageSize?: number;
/**
* Field to sort overrides by. Supported values: `id`, `org_uuid`, `-id`, `-org_uuid`. Defaults to `id`.
* @type OrgGroupPolicyOverrideSortOption
*/
sort?: OrgGroupPolicyOverrideSortOption;
}
export interface OrgGroupsApiListOrgGroupsRequest {
/**
* The page number to return.
* @type number
*/
pageNumber?: number;
/**
* The number of items per page. Maximum is 1000.
* @type number
*/
pageSize?: number;
/**
* Field to sort org groups by. Supported values: `name`, `uuid`, `-name`, `-uuid`. Defaults to `uuid`.
* @type OrgGroupSortOption
*/
sort?: OrgGroupSortOption;
}
export interface OrgGroupsApiUpdateOrgGroupRequest {
/**
* The ID of the org group.
* @type string
*/
orgGroupId: string;
/**
* @type OrgGroupUpdateRequest
*/
body: OrgGroupUpdateRequest;
}
export interface OrgGroupsApiUpdateOrgGroupMembershipRequest {
/**
* The ID of the org group membership.
* @type string
*/
orgGroupMembershipId: string;
/**
* @type OrgGroupMembershipUpdateRequest
*/
body: OrgGroupMembershipUpdateRequest;
}
export interface OrgGroupsApiUpdateOrgGroupPolicyRequest {
/**
* The ID of the org group policy.
* @type string
*/
orgGroupPolicyId: string;
/**
* @type OrgGroupPolicyUpdateRequest
*/
body: OrgGroupPolicyUpdateRequest;
}
export interface OrgGroupsApiUpdateOrgGroupPolicyOverrideRequest {
/**
* The ID of the org group policy override.
* @type string
*/
orgGroupPolicyOverrideId: string;
/**
* @type OrgGroupPolicyOverrideUpdateRequest
*/
body: OrgGroupPolicyOverrideUpdateRequest;
}
export declare class OrgGroupsApi {
private requestFactory;
private responseProcessor;
private configuration;
constructor(configuration: Configuration, requestFactory?: OrgGroupsApiRequestFactory, responseProcessor?: OrgGroupsApiResponseProcessor);
/**
* Move a batch of organizations from one org group to another. This is an atomic operation. Maximum 100 orgs per request.
* @param param The request object
*/
bulkUpdateOrgGroupMemberships(param: OrgGroupsApiBulkUpdateOrgGroupMembershipsRequest, options?: Configuration): Promise<OrgGroupMembershipListResponse>;
/**
* Create a new organization group.
* @param param The request object
*/
createOrgGroup(param: OrgGroupsApiCreateOrgGroupRequest, options?: Configuration): Promise<OrgGroupResponse>;
/**
* Create a new policy for an organization group.
* @param param The request object
*/
createOrgGroupPolicy(param: OrgGroupsApiCreateOrgGroupPolicyRequest, options?: Configuration): Promise<OrgGroupPolicyResponse>;
/**
* Create a new policy override for an organization within an org group.
* @param param The request object
*/
createOrgGroupPolicyOverride(param: OrgGroupsApiCreateOrgGroupPolicyOverrideRequest, options?: Configuration): Promise<OrgGroupPolicyOverrideResponse>;
/**
* Delete an organization group by its ID.
* @param param The request object
*/
deleteOrgGroup(param: OrgGroupsApiDeleteOrgGroupRequest, options?: Configuration): Promise<void>;
/**
* Delete an organization group policy by its ID.
* @param param The request object
*/
deleteOrgGroupPolicy(param: OrgGroupsApiDeleteOrgGroupPolicyRequest, options?: Configuration): Promise<void>;
/**
* Delete an organization group policy override by its ID.
* @param param The request object
*/
deleteOrgGroupPolicyOverride(param: OrgGroupsApiDeleteOrgGroupPolicyOverrideRequest, options?: Configuration): Promise<void>;
/**
* Get a specific organization group by its ID.
* @param param The request object
*/
getOrgGroup(param: OrgGroupsApiGetOrgGroupRequest, options?: Configuration): Promise<OrgGroupResponse>;
/**
* Get a specific organization group membership by its ID.
* @param param The request object
*/
getOrgGroupMembership(param: OrgGroupsApiGetOrgGroupMembershipRequest, options?: Configuration): Promise<OrgGroupMembershipResponse>;
/**
* Get a specific organization group policy by its ID.
* @param param The request object
*/
getOrgGroupPolicy(param: OrgGroupsApiGetOrgGroupPolicyRequest, options?: Configuration): Promise<OrgGroupPolicyResponse>;
/**
* Get a specific organization group policy override by its ID.
* @param param The request object
*/
getOrgGroupPolicyOverride(param: OrgGroupsApiGetOrgGroupPolicyOverrideRequest, options?: Configuration): Promise<OrgGroupPolicyOverrideResponse>;
/**
* List organization group memberships. Filter by org group ID or org UUID. At least one of `filter[org_group_id]` or `filter[org_uuid]` must be provided. When filtering by org UUID, returns a single-item list with the membership for that org.
* @param param The request object
*/
listOrgGroupMemberships(param?: OrgGroupsApiListOrgGroupMembershipsRequest, options?: Configuration): Promise<OrgGroupMembershipListResponse>;
/**
* List policies for an organization group. Requires a filter on org group ID.
* @param param The request object
*/
listOrgGroupPolicies(param: OrgGroupsApiListOrgGroupPoliciesRequest, options?: Configuration): Promise<OrgGroupPolicyListResponse>;
/**
* List all org configs that are eligible to be used as organization group policies.
* @param param The request object
*/
listOrgGroupPolicyConfigs(options?: Configuration): Promise<OrgGroupPolicyConfigListResponse>;
/**
* List policy overrides for an organization group. Requires a filter on org group ID. Optionally filter by policy ID.
* @param param The request object
*/
listOrgGroupPolicyOverrides(param: OrgGroupsApiListOrgGroupPolicyOverridesRequest, options?: Configuration): Promise<OrgGroupPolicyOverrideListResponse>;
/**
* List all organization groups that the requesting organization has access to.
* @param param The request object
*/
listOrgGroups(param?: OrgGroupsApiListOrgGroupsRequest, options?: Configuration): Promise<OrgGroupListResponse>;
/**
* Update the name of an existing organization group.
* @param param The request object
*/
updateOrgGroup(param: OrgGroupsApiUpdateOrgGroupRequest, options?: Configuration): Promise<OrgGroupResponse>;
/**
* Move an organization to a different org group by updating its membership.
* @param param The request object
*/
updateOrgGroupMembership(param: OrgGroupsApiUpdateOrgGroupMembershipRequest, options?: Configuration): Promise<OrgGroupMembershipResponse>;
/**
* Update an existing organization group policy.
* @param param The request object
*/
updateOrgGroupPolicy(param: OrgGroupsApiUpdateOrgGroupPolicyRequest, options?: Configuration): Promise<OrgGroupPolicyResponse>;
/**
* Update an existing organization group policy override.
* @param param The request object
*/
updateOrgGroupPolicyOverride(param: OrgGroupsApiUpdateOrgGroupPolicyOverrideRequest, options?: Configuration): Promise<OrgGroupPolicyOverrideResponse>;
}