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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2025-07-02 12:38:43.717493",
"spec_repo_commit": "4fd1c189"
"regenerated": "2025-07-02 16:34:52.201607",
"spec_repo_commit": "de2517ad"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2025-07-02 12:38:43.733432",
"spec_repo_commit": "4fd1c189"
"regenerated": "2025-07-02 16:34:52.217566",
"spec_repo_commit": "de2517ad"
}
}
}
64 changes: 64 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1536,6 +1536,54 @@ components:
- type
- credentials
type: object
AWSIntegrationIamPermissionsResponse:
description: AWS Integration IAM Permissions response body.
properties:
data:
$ref: '#/components/schemas/AWSIntegrationIamPermissionsResponseData'
required:
- data
type: object
AWSIntegrationIamPermissionsResponseAttributes:
description: AWS Integration IAM Permissions response attributes.
properties:
permissions:
description: List of AWS IAM permissions required for the integration.
example:
- account:GetContactInformation
- amplify:ListApps
- amplify:ListArtifacts
- amplify:ListBackendEnvironments
- amplify:ListBranches
items:
example: account:GetContactInformation
type: string
type: array
required:
- permissions
type: object
AWSIntegrationIamPermissionsResponseData:
description: AWS Integration IAM Permissions response data.
properties:
attributes:
$ref: '#/components/schemas/AWSIntegrationIamPermissionsResponseAttributes'
id:
default: permissions
description: The `AWSIntegrationIamPermissionsResponseData` `id`.
example: permissions
type: string
type:
$ref: '#/components/schemas/AWSIntegrationIamPermissionsResponseDataType'
type: object
AWSIntegrationIamPermissionsResponseDataType:
default: permissions
description: The `AWSIntegrationIamPermissionsResponseData` `type`.
enum:
- permissions
example: permissions
type: string
x-enum-varnames:
- PERMISSIONS
AWSIntegrationType:
description: The definition of `AWSIntegrationType` object.
enum:
Expand Down Expand Up @@ -49519,6 +49567,22 @@ paths:
x-unstable: '**Note: This endpoint is in Preview. If you have any feedback,

contact [Datadog support](https://docs.datadoghq.com/help/).**'
/api/v2/integration/aws/iam_permissions:
get:
description: Get all AWS IAM permissions required for the AWS integration.
operationId: GetAWSIntegrationIAMPermissions
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AWSIntegrationIamPermissionsResponse'
description: AWS IAM Permissions object
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get AWS integration IAM permissions
tags:
- AWS Integration
/api/v2/integration/aws/logs/services:
get:
description: Get a list of AWS services that can send logs to Datadog.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Get AWS integration IAM permissions returns "AWS IAM Permissions object" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V2::AWSIntegrationAPI.new
p api_instance.get_aws_integration_iam_permissions()
6 changes: 6 additions & 0 deletions features/v2/aws_integration.feature
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ Feature: AWS Integration
When the request is sent
Then the response status is 200 AWS External ID object

@generated @skip @team:DataDog/aws-integrations
Scenario: Get AWS integration IAM permissions returns "AWS IAM Permissions object" response
Given new "GetAWSIntegrationIAMPermissions" request
When the request is sent
Then the response status is 200 AWS IAM Permissions object

@team:DataDog/aws-integrations
Scenario: Get an AWS integration by config ID returns "AWS Account object" response
Given operation "GetAWSAccount" enabled
Expand Down
6 changes: 6 additions & 0 deletions features/v2/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,12 @@
"type": "safe"
}
},
"GetAWSIntegrationIAMPermissions": {
"tag": "AWS Integration",
"undo": {
"type": "safe"
}
},
"ListAWSLogsServices": {
"tag": "AWS Logs Integration",
"undo": {
Expand Down
4 changes: 4 additions & 0 deletions lib/datadog_api_client/inflector.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,10 @@ def overrides
"v2.aws_cur_configs_response" => "AwsCURConfigsResponse",
"v2.aws_cur_config_type" => "AwsCURConfigType",
"v2.aws_integration" => "AWSIntegration",
"v2.aws_integration_iam_permissions_response" => "AWSIntegrationIamPermissionsResponse",
"v2.aws_integration_iam_permissions_response_attributes" => "AWSIntegrationIamPermissionsResponseAttributes",
"v2.aws_integration_iam_permissions_response_data" => "AWSIntegrationIamPermissionsResponseData",
"v2.aws_integration_iam_permissions_response_data_type" => "AWSIntegrationIamPermissionsResponseDataType",
"v2.aws_integration_type" => "AWSIntegrationType",
"v2.aws_integration_update" => "AWSIntegrationUpdate",
"v2.aws_lambda_forwarder_config" => "AWSLambdaForwarderConfig",
Expand Down
60 changes: 60 additions & 0 deletions lib/datadog_api_client/v2/api/aws_integration_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,66 @@ def get_aws_account_with_http_info(aws_account_config_id, opts = {})
return data, status_code, headers
end

# Get AWS integration IAM permissions.
#
# @see #get_aws_integration_iam_permissions_with_http_info
def get_aws_integration_iam_permissions(opts = {})
data, _status_code, _headers = get_aws_integration_iam_permissions_with_http_info(opts)
data
end

# Get AWS integration IAM permissions.
#
# Get all AWS IAM permissions required for the AWS integration.
#
# @param opts [Hash] the optional parameters
# @return [Array<(AWSIntegrationIamPermissionsResponse, Integer, Hash)>] AWSIntegrationIamPermissionsResponse data, response status code and response headers
def get_aws_integration_iam_permissions_with_http_info(opts = {})

if @api_client.config.debugging
@api_client.config.logger.debug 'Calling API: AWSIntegrationAPI.get_aws_integration_iam_permissions ...'
end
# resource path
local_var_path = '/api/v2/integration/aws/iam_permissions'

# query parameters
query_params = opts[:query_params] || {}

# header parameters
header_params = opts[:header_params] || {}
# HTTP header 'Accept' (if needed)
header_params['Accept'] = @api_client.select_header_accept(['application/json'])

# form parameters
form_params = opts[:form_params] || {}

# http body (model)
post_body = opts[:debug_body]

# return_type
return_type = opts[:debug_return_type] || 'AWSIntegrationIamPermissionsResponse'

# auth_names
auth_names = opts[:debug_auth_names] || [:apiKeyAuth, :appKeyAuth]

new_options = opts.merge(
:operation => :get_aws_integration_iam_permissions,
:header_params => header_params,
:query_params => query_params,
:form_params => form_params,
:body => post_body,
:auth_names => auth_names,
:return_type => return_type,
:api_version => "V2"
)

data, status_code, headers = @api_client.call_api(Net::HTTP::Get, local_var_path, new_options)
if @api_client.config.debugging
@api_client.config.logger.debug "API called: AWSIntegrationAPI#get_aws_integration_iam_permissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
end
return data, status_code, headers
end

# List all AWS integrations.
#
# @see #list_aws_accounts_with_http_info
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
=begin
#Datadog API V2 Collection

#Collection of all Datadog Public endpoints.

The version of the OpenAPI document: 1.0
Contact: [email protected]
Generated by: https://github.com/DataDog/datadog-api-client-ruby/tree/master/.generator

Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
This product includes software developed at Datadog (https://www.datadoghq.com/).
Copyright 2020-Present Datadog, Inc.

=end

require 'date'
require 'time'

module DatadogAPIClient::V2
# AWS Integration IAM Permissions response body.
class AWSIntegrationIamPermissionsResponse
include BaseGenericModel

# AWS Integration IAM Permissions response data.
attr_reader :data

attr_accessor :additional_properties

# Attribute mapping from ruby-style variable name to JSON key.
# @!visibility private
def self.attribute_map
{
:'data' => :'data'
}
end

# Attribute type mapping.
# @!visibility private
def self.openapi_types
{
:'data' => :'AWSIntegrationIamPermissionsResponseData'
}
end

# Initializes the object
# @param attributes [Hash] Model attributes in the form of hash
# @!visibility private
def initialize(attributes = {})
if (!attributes.is_a?(Hash))
fail ArgumentError, "The input argument (attributes) must be a hash in `DatadogAPIClient::V2::AWSIntegrationIamPermissionsResponse` initialize method"
end

self.additional_properties = {}
# check to see if the attribute exists and convert string to symbol for hash key
attributes = attributes.each_with_object({}) { |(k, v), h|
if (!self.class.attribute_map.key?(k.to_sym))
self.additional_properties[k.to_sym] = v
else
h[k.to_sym] = v
end
}

if attributes.key?(:'data')
self.data = attributes[:'data']
end
end

# Check to see if the all the properties in the model are valid
# @return true if the model is valid
# @!visibility private
def valid?
return false if @data.nil?
true
end

# Custom attribute writer method with validation
# @param data [Object] Object to be assigned
# @!visibility private
def data=(data)
if data.nil?
fail ArgumentError, 'invalid value for "data", data cannot be nil.'
end
@data = data
end

# Returns the object in the form of hash, with additionalProperties support.
# @return [Hash] Returns the object in the form of hash
# @!visibility private
def to_hash
hash = {}
self.class.attribute_map.each_pair do |attr, param|
value = self.send(attr)
if value.nil?
is_nullable = self.class.openapi_nullable.include?(attr)
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
end

hash[param] = _to_hash(value)
end
self.additional_properties.each_pair do |attr, value|
hash[attr] = value
end
hash
end

# Checks equality by comparing each attribute.
# @param o [Object] Object to be compared
# @!visibility private
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
data == o.data &&
additional_properties == o.additional_properties
end

# Calculates hash code according to all attributes.
# @return [Integer] Hash code
# @!visibility private
def hash
[data, additional_properties].hash
end
end
end
Loading
Loading