Skip to content

Commit 45b90dc

Browse files
github-actions[bot]wtrockigssbzn
authored
APIBot: SDK update based on recent changes in Atlas API (#195)
Co-authored-by: wtrocki <[email protected]> Co-authored-by: Wojciech Trocki <[email protected]> Co-authored-by: Gustavo Bazan <[email protected]>
1 parent 6d0102b commit 45b90dc

File tree

118 files changed

+9092
-2587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

118 files changed

+9092
-2587
lines changed

.github/workflows/breaking-changes.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: (Optional) Detect Breaking Changes
2-
on:
3-
pull_request:
2+
on:
3+
pull_request:
44
## Exclude major releases containing breaking changes info
5-
paths:
6-
- '!tools/releaser/breaking_changes/**'
5+
paths-ignore:
6+
- 'tools/releaser/breaking_changes/**'
77
jobs:
88
go-apidiff:
99
runs-on: ubuntu-latest
@@ -18,4 +18,4 @@ jobs:
1818
- uses: joelanford/go-apidiff@main
1919
- name: braking change detected
2020
if: ${{ failure() }}
21-
run: echo "run `make update-version` and commit the changes if you already did this please ignore. See https://github.com/joelanford/go-apidiff/issues/37"
21+
run: echo "Review for false positives. If you see any breaking change run `make update-version` and commit the changes."

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Note that `atlas-sdk-go` only supports the two most recent major versions of Go.
1111
### Adding Dependency
1212

1313
```terminal
14-
go get go.mongodb.org/atlas-sdk/v20230201007
14+
go get go.mongodb.org/atlas-sdk/v20230201008
1515
```
1616

1717
### Using in the code
@@ -20,7 +20,7 @@ Construct a new Atlas SDK client, then use the various services on the client to
2020
access different parts of the Atlas API. For example:
2121

2222
```go
23-
import "go.mongodb.org/atlas-sdk/v20230201007/admin"
23+
import "go.mongodb.org/atlas-sdk/v20230201008/admin"
2424

2525
func example() {
2626
ctx := context.Background()

admin/api_cloud_provider_access.go

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type CloudProviderAccessApi interface {
1616
/*
1717
AuthorizeCloudProviderAccessRole Authorize One Cloud Provider Access Role
1818
19-
Grants access to the specified project for the specified Amazon Web Services (AWS) Identity and Access Management (IAM) role. To use this resource, the requesting API Key must have the Project Owner role. This API endpoint is one step in a procedure to create unified AWS access for MongoDB Cloud services.
19+
Grants access to the specified project for the specified access role. To use this resource, the requesting API Key must have the Project Owner role. This API endpoint is one step in a procedure to create unified access for MongoDB Cloud services.
2020
2121
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
2222
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -40,9 +40,7 @@ type CloudProviderAccessApi interface {
4040
/*
4141
CreateCloudProviderAccessRole Create One Cloud Provider Access Role
4242
43-
Creates one Amazon Web Services (AWS) Identity and Access Management (IAM) role. Some MongoDB Cloud features use AWS IAM roles for authentication. To use this resource, the requesting API Key must have the Project Owner role.
44-
45-
After a successful request to this API endpoint, you can add the **atlasAWSAccountArn** and **atlasAssumedRoleExternalId** values to the trust policy in your AWS console to create an IAM Assumed Amazon Resource Name (ARN).
43+
Creates one access role for the specified cloud provider. Some MongoDB Cloud features use these cloud provider access roles for authentication. To use this resource, the requesting API Key must have the Project Owner role.
4644
4745
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
4846
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -65,7 +63,7 @@ type CloudProviderAccessApi interface {
6563
/*
6664
DeauthorizeCloudProviderAccessRole Deauthorize One Cloud Provider Access Role
6765
68-
Revokes access to the specified project for the specified AWS IAM role. To use this resource, the requesting API Key must have the Project Owner role.
66+
Revokes access to the specified project for the specified access role. To use this resource, the requesting API Key must have the Project Owner role.
6967
7068
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
7169
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -90,7 +88,7 @@ type CloudProviderAccessApi interface {
9088
/*
9189
GetCloudProviderAccessRole Return specified Cloud Provider Access Role
9290
93-
[experimental] Returns the Amazon Web Services (AWS) Identity and Access Management (IAM) role with the specified id and with access to the specified project. To use this resource, the requesting API Key must have the Project Owner role.
91+
[experimental] Returns the access role with the specified id and with access to the specified project. To use this resource, the requesting API Key must have the Project Owner role.
9492
9593
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
9694
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -114,7 +112,7 @@ type CloudProviderAccessApi interface {
114112
/*
115113
ListCloudProviderAccessRoles Return All Cloud Provider Access Roles
116114
117-
Returns all Amazon Web Services (AWS) Identity and Access Management (IAM) roles with access to the specified project. To use this resource, the requesting API Key must have the Project Owner role.
115+
Returns all cloud provider access roles with access to the specified project. To use this resource, the requesting API Key must have the Project Owner role.
118116
119117
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
120118
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -169,7 +167,7 @@ func (r AuthorizeCloudProviderAccessRoleApiRequest) Execute() (*CloudProviderAcc
169167
/*
170168
AuthorizeCloudProviderAccessRole Authorize One Cloud Provider Access Role
171169
172-
Grants access to the specified project for the specified Amazon Web Services (AWS) Identity and Access Management (IAM) role. To use this resource, the requesting API Key must have the Project Owner role. This API endpoint is one step in a procedure to create unified AWS access for MongoDB Cloud services.
170+
Grants access to the specified project for the specified access role. To use this resource, the requesting API Key must have the Project Owner role. This API endpoint is one step in a procedure to create unified access for MongoDB Cloud services.
173171
174172
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
175173
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -317,9 +315,7 @@ func (r CreateCloudProviderAccessRoleApiRequest) Execute() (*CloudProviderAccess
317315
/*
318316
CreateCloudProviderAccessRole Create One Cloud Provider Access Role
319317
320-
Creates one Amazon Web Services (AWS) Identity and Access Management (IAM) role. Some MongoDB Cloud features use AWS IAM roles for authentication. To use this resource, the requesting API Key must have the Project Owner role.
321-
322-
After a successful request to this API endpoint, you can add the **atlasAWSAccountArn** and **atlasAssumedRoleExternalId** values to the trust policy in your AWS console to create an IAM Assumed Amazon Resource Name (ARN).
318+
Creates one access role for the specified cloud provider. Some MongoDB Cloud features use these cloud provider access roles for authentication. To use this resource, the requesting API Key must have the Project Owner role.
323319
324320
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
325321
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -461,7 +457,7 @@ func (r DeauthorizeCloudProviderAccessRoleApiRequest) Execute() (*http.Response,
461457
/*
462458
DeauthorizeCloudProviderAccessRole Deauthorize One Cloud Provider Access Role
463459
464-
Revokes access to the specified project for the specified AWS IAM role. To use this resource, the requesting API Key must have the Project Owner role.
460+
Revokes access to the specified project for the specified access role. To use this resource, the requesting API Key must have the Project Owner role.
465461
466462
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
467463
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -594,7 +590,7 @@ func (r GetCloudProviderAccessRoleApiRequest) Execute() (*CloudProviderAccessRol
594590
/*
595591
GetCloudProviderAccessRole Return specified Cloud Provider Access Role
596592
597-
[experimental] Returns the Amazon Web Services (AWS) Identity and Access Management (IAM) role with the specified id and with access to the specified project. To use this resource, the requesting API Key must have the Project Owner role.
593+
[experimental] Returns the access role with the specified id and with access to the specified project. To use this resource, the requesting API Key must have the Project Owner role.
598594
599595
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
600596
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.
@@ -733,7 +729,7 @@ func (r ListCloudProviderAccessRolesApiRequest) Execute() (*CloudProviderAccessR
733729
/*
734730
ListCloudProviderAccessRoles Return All Cloud Provider Access Roles
735731
736-
Returns all Amazon Web Services (AWS) Identity and Access Management (IAM) roles with access to the specified project. To use this resource, the requesting API Key must have the Project Owner role.
732+
Returns all cloud provider access roles with access to the specified project. To use this resource, the requesting API Key must have the Project Owner role.
737733
738734
@param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
739735
@param groupId Unique 24-hexadecimal digit string that identifies your project. Use the [/groups](#tag/Projects/operation/listProjects) endpoint to retrieve all projects to which the authenticated user has access. **NOTE**: Groups and projects are synonymous terms. Your group id is the same as your project id. For existing groups, your group/project id remains the same. The resource and corresponding endpoints use the term groups.

admin/api_events.go

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -678,44 +678,47 @@ func (a *EventsApiService) listOrganizationEventsExecute(r ListOrganizationEvent
678678
}
679679

680680
type ListProjectEventsApiRequest struct {
681-
ctx context.Context
682-
ApiService EventsApi
683-
groupId string
684-
includeCount *bool
685-
itemsPerPage *int
686-
pageNum *int
687-
clusterNames *[]string
688-
eventType *[]string
689-
includeRaw *bool
690-
maxDate *time.Time
691-
minDate *time.Time
681+
ctx context.Context
682+
ApiService EventsApi
683+
groupId string
684+
includeCount *bool
685+
itemsPerPage *int
686+
pageNum *int
687+
clusterNames *[]string
688+
eventType *[]string
689+
excludedEventType *[]string
690+
includeRaw *bool
691+
maxDate *time.Time
692+
minDate *time.Time
692693
}
693694

694695
type ListProjectEventsApiParams struct {
695-
GroupId string
696-
IncludeCount *bool
697-
ItemsPerPage *int
698-
PageNum *int
699-
ClusterNames *[]string
700-
EventType *[]string
701-
IncludeRaw *bool
702-
MaxDate *time.Time
703-
MinDate *time.Time
696+
GroupId string
697+
IncludeCount *bool
698+
ItemsPerPage *int
699+
PageNum *int
700+
ClusterNames *[]string
701+
EventType *[]string
702+
ExcludedEventType *[]string
703+
IncludeRaw *bool
704+
MaxDate *time.Time
705+
MinDate *time.Time
704706
}
705707

706708
func (a *EventsApiService) ListProjectEventsWithParams(ctx context.Context, args *ListProjectEventsApiParams) ListProjectEventsApiRequest {
707709
return ListProjectEventsApiRequest{
708-
ApiService: a,
709-
ctx: ctx,
710-
groupId: args.GroupId,
711-
includeCount: args.IncludeCount,
712-
itemsPerPage: args.ItemsPerPage,
713-
pageNum: args.PageNum,
714-
clusterNames: args.ClusterNames,
715-
eventType: args.EventType,
716-
includeRaw: args.IncludeRaw,
717-
maxDate: args.MaxDate,
718-
minDate: args.MinDate,
710+
ApiService: a,
711+
ctx: ctx,
712+
groupId: args.GroupId,
713+
includeCount: args.IncludeCount,
714+
itemsPerPage: args.ItemsPerPage,
715+
pageNum: args.PageNum,
716+
clusterNames: args.ClusterNames,
717+
eventType: args.EventType,
718+
excludedEventType: args.ExcludedEventType,
719+
includeRaw: args.IncludeRaw,
720+
maxDate: args.MaxDate,
721+
minDate: args.MinDate,
719722
}
720723
}
721724

@@ -749,6 +752,12 @@ func (r ListProjectEventsApiRequest) EventType(eventType []string) ListProjectEv
749752
return r
750753
}
751754

755+
// Category of event that you would like to exclude from query results, such as CLUSTER_CREATED **IMPORTANT**: Event type names change frequently. Verify that you specify the event type correctly by checking the complete list of event types.
756+
func (r ListProjectEventsApiRequest) ExcludedEventType(excludedEventType []string) ListProjectEventsApiRequest {
757+
r.excludedEventType = &excludedEventType
758+
return r
759+
}
760+
752761
// Flag that indicates whether to include the raw document in the output. The raw document contains additional meta information about the event.
753762
func (r ListProjectEventsApiRequest) IncludeRaw(includeRaw bool) ListProjectEventsApiRequest {
754763
r.includeRaw = &includeRaw
@@ -853,6 +862,13 @@ func (a *EventsApiService) listProjectEventsExecute(r ListProjectEventsApiReques
853862
_ = reflect.Append
854863
parameterAddToHeaderOrQuery(localVarQueryParams, "eventType", t, "multi")
855864

865+
}
866+
if r.excludedEventType != nil {
867+
t := *r.excludedEventType
868+
// Workaround for unused import
869+
_ = reflect.Append
870+
parameterAddToHeaderOrQuery(localVarQueryParams, "excludedEventType", t, "multi")
871+
856872
}
857873
if r.includeRaw != nil {
858874
parameterAddToHeaderOrQuery(localVarQueryParams, "includeRaw", r.includeRaw, "")

0 commit comments

Comments
 (0)