Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 159 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,14 @@ components:
example: 10
format: int64
type: integer
PersonaMappingID:
description: The ID of the persona mapping
example: c5c758c6-18c2-4484-ae3f-46b84128404a
in: path
name: persona_mapping_id
required: true
schema:
type: string
ProductName:
description: Name of the product to be deleted, either `logs` or `rum`.
in: path
Expand Down Expand Up @@ -1910,6 +1918,41 @@ components:
- account_identifier
- account_uuid
type: object
AWSCloudAuthPersonaMappingCreateAttributes:
description: Attributes for creating an AWS cloud authentication persona mapping
properties:
account_identifier:
description: Datadog account identifier (email or handle) mapped to the
AWS principal
example: test@test.com
type: string
arn_pattern:
description: AWS IAM ARN pattern to match for authentication
example: arn:aws:iam::123456789012:user/testuser
type: string
required:
- arn_pattern
- account_identifier
type: object
AWSCloudAuthPersonaMappingCreateData:
description: Data for creating an AWS cloud authentication persona mapping
properties:
attributes:
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingCreateAttributes'
type:
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingType'
required:
- type
- attributes
type: object
AWSCloudAuthPersonaMappingCreateRequest:
description: Request used to create an AWS cloud authentication persona mapping
properties:
data:
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingCreateData'
required:
- data
type: object
AWSCloudAuthPersonaMappingDataResponse:
description: Data for AWS cloud authentication persona mapping response
properties:
Expand All @@ -1926,6 +1969,14 @@ components:
- type
- attributes
type: object
AWSCloudAuthPersonaMappingResponse:
description: Response containing a single AWS cloud authentication persona mapping
properties:
data:
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingDataResponse'
required:
- data
type: object
AWSCloudAuthPersonaMappingType:
description: Type identifier for AWS cloud authentication persona mapping
enum:
Expand Down Expand Up @@ -77100,6 +77151,114 @@ paths:
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
post:
description: Create an AWS cloud authentication persona mapping. This endpoint
associates an AWS IAM principal with a Datadog user.
operationId: CreateAWSCloudAuthPersonaMapping
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingCreateRequest'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingResponse'
description: Created
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Bad Request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Forbidden
'409':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Conflict
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Create an AWS cloud authentication persona mapping
tags:
- Cloud Authentication
x-codegen-request-body-name: body
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/cloud_auth/aws/persona_mapping/{persona_mapping_id}:
delete:
description: Delete an AWS cloud authentication persona mapping by ID. This
removes the association between an AWS IAM principal and a Datadog user.
operationId: DeleteAWSCloudAuthPersonaMapping
parameters:
- $ref: '#/components/parameters/PersonaMappingID'
responses:
'204':
description: No Content
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Delete an AWS cloud authentication persona mapping
tags:
- Cloud Authentication
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
get:
description: Get a specific AWS cloud authentication persona mapping by ID.
This endpoint retrieves a single configured persona mapping that associates
an AWS IAM principal with a Datadog user.
operationId: GetAWSCloudAuthPersonaMapping
parameters:
- $ref: '#/components/parameters/PersonaMappingID'
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AWSCloudAuthPersonaMappingResponse'
description: OK
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Forbidden
'404':
content:
application/json:
schema:
$ref: '#/components/schemas/JSONAPIErrorResponse'
description: Not Found
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get an AWS cloud authentication persona mapping
tags:
- Cloud Authentication
x-unstable: '**Note**: This endpoint is in public beta and is subject to change.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/cloud_security_management/custom_frameworks:
post:
description: Create a custom framework.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
// Create an AWS cloud authentication persona mapping returns "Created" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CloudAuthenticationApi;
import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingCreateAttributes;
import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingCreateData;
import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingCreateRequest;
import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingResponse;
import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingType;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.createAWSCloudAuthPersonaMapping", true);
CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient);

AWSCloudAuthPersonaMappingCreateRequest body =
new AWSCloudAuthPersonaMappingCreateRequest()
.data(
new AWSCloudAuthPersonaMappingCreateData()
.attributes(
new AWSCloudAuthPersonaMappingCreateAttributes()
.accountIdentifier("test@test.com")
.arnPattern("arn:aws:iam::123456789012:user/testuser"))
.type(AWSCloudAuthPersonaMappingType.AWS_CLOUD_AUTH_CONFIG));

try {
AWSCloudAuthPersonaMappingResponse result =
apiInstance.createAWSCloudAuthPersonaMapping(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println(
"Exception when calling CloudAuthenticationApi#createAWSCloudAuthPersonaMapping");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Delete an AWS cloud authentication persona mapping returns "No Content" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CloudAuthenticationApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.deleteAWSCloudAuthPersonaMapping", true);
CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient);

try {
apiInstance.deleteAWSCloudAuthPersonaMapping("c5c758c6-18c2-4484-ae3f-46b84128404a");
} catch (ApiException e) {
System.err.println(
"Exception when calling CloudAuthenticationApi#deleteAWSCloudAuthPersonaMapping");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
// Get an AWS cloud authentication persona mapping returns "OK" response

import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.CloudAuthenticationApi;
import com.datadog.api.client.v2.model.AWSCloudAuthPersonaMappingResponse;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getAWSCloudAuthPersonaMapping", true);
CloudAuthenticationApi apiInstance = new CloudAuthenticationApi(defaultClient);

try {
AWSCloudAuthPersonaMappingResponse result =
apiInstance.getAWSCloudAuthPersonaMapping("c5c758c6-18c2-4484-ae3f-46b84128404a");
System.out.println(result);
} catch (ApiException e) {
System.err.println(
"Exception when calling CloudAuthenticationApi#getAWSCloudAuthPersonaMapping");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
3 changes: 3 additions & 0 deletions src/main/java/com/datadog/api/client/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -788,6 +788,9 @@ public class ApiClient {
put("v2.getChangeRequest", false);
put("v2.updateChangeRequest", false);
put("v2.updateChangeRequestDecision", false);
put("v2.createAWSCloudAuthPersonaMapping", false);
put("v2.deleteAWSCloudAuthPersonaMapping", false);
put("v2.getAWSCloudAuthPersonaMapping", false);
put("v2.listAWSCloudAuthPersonaMappings", false);
put("v2.activateContentPack", false);
put("v2.cancelThreatHuntingJob", false);
Expand Down
Loading
Loading