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
33 changes: 33 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -62417,6 +62417,39 @@ paths:
get:
description: Returns a list of org connections.
operationId: ListOrgConnections
parameters:
- description: The Org ID of the sink org.
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
in: query
name: sink_org_id
required: false
schema:
type: string
- description: The Org ID of the source org.
example: 0879ce27-29a1-481f-a12e-bc2a48ec9ae1
in: query
name: source_org_id
required: false
schema:
type: string
- description: The limit of number of entries you want to return. Default is
1000.
example: 1000
in: query
name: limit
required: false
schema:
format: int64
type: integer
- description: The pagination offset which you want to query from. Default is
0.
example: 0
in: query
name: offset
required: false
schema:
format: int64
type: integer
responses:
'200':
content:
Expand Down
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
# CHANGELOG

## 2.46.0/2025-09-15

### Added
* Add Query Parameters to ListOrgConnections Endpoint [#3346](https://github.com/DataDog/datadog-api-client-go/pull/3346)
* Add Incident Notification Rules Public Spec [#3340](https://github.com/DataDog/datadog-api-client-go/pull/3340)
* Update v1 and v2 GCP API specs to support `monitored_resource_configs` [#3338](https://github.com/DataDog/datadog-api-client-go/pull/3338)
* Add action datastore API [#3315](https://github.com/DataDog/datadog-api-client-go/pull/3315)
* Security Monitoring - Make hasOptionalGroupByFields updatable [#3274](https://github.com/DataDog/datadog-api-client-go/pull/3274)

### Deprecated
* Promote unstable aws v2 APIs and deprecate v1 [#3337](https://github.com/DataDog/datadog-api-client-go/pull/3337)

### Changed
* Allow to send batches of events in pipelines API [#3319](https://github.com/DataDog/datadog-api-client-go/pull/3319)

## 2.45.0/2025-09-09

### Added
Expand Down
60 changes: 59 additions & 1 deletion api/datadogV2/api_org_connections.go
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,61 @@ func (a *OrgConnectionsApi) DeleteOrgConnections(ctx _context.Context, connectio
return localVarHTTPResponse, nil
}

// ListOrgConnectionsOptionalParameters holds optional parameters for ListOrgConnections.
type ListOrgConnectionsOptionalParameters struct {
SinkOrgId *string
SourceOrgId *string
Limit *int64
Offset *int64
}

// NewListOrgConnectionsOptionalParameters creates an empty struct for parameters.
func NewListOrgConnectionsOptionalParameters() *ListOrgConnectionsOptionalParameters {
this := ListOrgConnectionsOptionalParameters{}
return &this
}

// WithSinkOrgId sets the corresponding parameter name and returns the struct.
func (r *ListOrgConnectionsOptionalParameters) WithSinkOrgId(sinkOrgId string) *ListOrgConnectionsOptionalParameters {
r.SinkOrgId = &sinkOrgId
return r
}

// WithSourceOrgId sets the corresponding parameter name and returns the struct.
func (r *ListOrgConnectionsOptionalParameters) WithSourceOrgId(sourceOrgId string) *ListOrgConnectionsOptionalParameters {
r.SourceOrgId = &sourceOrgId
return r
}

// WithLimit sets the corresponding parameter name and returns the struct.
func (r *ListOrgConnectionsOptionalParameters) WithLimit(limit int64) *ListOrgConnectionsOptionalParameters {
r.Limit = &limit
return r
}

// WithOffset sets the corresponding parameter name and returns the struct.
func (r *ListOrgConnectionsOptionalParameters) WithOffset(offset int64) *ListOrgConnectionsOptionalParameters {
r.Offset = &offset
return r
}

// ListOrgConnections List Org Connections.
// Returns a list of org connections.
func (a *OrgConnectionsApi) ListOrgConnections(ctx _context.Context) (OrgConnectionListResponse, *_nethttp.Response, error) {
func (a *OrgConnectionsApi) ListOrgConnections(ctx _context.Context, o ...ListOrgConnectionsOptionalParameters) (OrgConnectionListResponse, *_nethttp.Response, error) {
var (
localVarHTTPMethod = _nethttp.MethodGet
localVarPostBody interface{}
localVarReturnValue OrgConnectionListResponse
optionalParams ListOrgConnectionsOptionalParameters
)

if len(o) > 1 {
return localVarReturnValue, nil, datadog.ReportError("only one argument of type ListOrgConnectionsOptionalParameters is allowed")
}
if len(o) == 1 {
optionalParams = o[0]
}

localBasePath, err := a.Client.Cfg.ServerURLWithContext(ctx, "v2.OrgConnectionsApi.ListOrgConnections")
if err != nil {
return localVarReturnValue, nil, datadog.GenericOpenAPIError{ErrorMessage: err.Error()}
Expand All @@ -183,6 +229,18 @@ func (a *OrgConnectionsApi) ListOrgConnections(ctx _context.Context) (OrgConnect
localVarHeaderParams := make(map[string]string)
localVarQueryParams := _neturl.Values{}
localVarFormParams := _neturl.Values{}
if optionalParams.SinkOrgId != nil {
localVarQueryParams.Add("sink_org_id", datadog.ParameterToString(*optionalParams.SinkOrgId, ""))
}
if optionalParams.SourceOrgId != nil {
localVarQueryParams.Add("source_org_id", datadog.ParameterToString(*optionalParams.SourceOrgId, ""))
}
if optionalParams.Limit != nil {
localVarQueryParams.Add("limit", datadog.ParameterToString(*optionalParams.Limit, ""))
}
if optionalParams.Offset != nil {
localVarQueryParams.Add("offset", datadog.ParameterToString(*optionalParams.Offset, ""))
}
localVarHeaderParams["Accept"] = "application/json"

if a.Client.Cfg.DelegatedTokenConfig != nil {
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/org-connections/ListOrgConnections.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func main() {
configuration := datadog.NewConfiguration()
apiClient := datadog.NewAPIClient(configuration)
api := datadogV2.NewOrgConnectionsApi(apiClient)
resp, r, err := api.ListOrgConnections(ctx)
resp, r, err := api.ListOrgConnections(ctx, *datadogV2.NewListOrgConnectionsOptionalParameters())

if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `OrgConnectionsApi.ListOrgConnections`: %v\n", err)
Expand Down
2 changes: 1 addition & 1 deletion version.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package client

// Version used in User-Agent header.
const Version = "2.45.0"
const Version = "2.46.0"
Loading