Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update import in Go examples #295

Merged
merged 1 commit into from
May 13, 2020
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.0.1.dev3",
"regenerated": "2020-05-12 17:11:06.543654",
"spec_repo_commit": "b8ba2d1"
"regenerated": "2020-05-13 15:38:58.538227",
"spec_repo_commit": "d9425c6"
},
"v2": {
"apigentools_version": "1.0.1.dev3",
"regenerated": "2020-05-12 17:11:10.635362",
"spec_repo_commit": "b8ba2d1"
"regenerated": "2020-05-13 15:39:02.949698",
"spec_repo_commit": "d9425c6"
}
}
}
40 changes: 20 additions & 20 deletions api/v1/datadog/docs/AWSIntegrationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := openapiclient.AWSAccount{AccessKeyId: "AccessKeyId_example", AccountId: "AccountId_example", AccountSpecificNamespaceRules: map[string]string{ "Key" = "Value" }, ExcludedRegions: []string{"ExcludedRegions_example"), FilterTags: []string{"FilterTags_example"), HostTags: []string{"HostTags_example"), RoleName: "RoleName_example", SecretAccessKey: "SecretAccessKey_example"} // AWSAccount | AWS Request Object
body := datadog.AWSAccount{AccessKeyId: "AccessKeyId_example", AccountId: "AccountId_example", AccountSpecificNamespaceRules: map[string]string{ "Key" = "Value" }, ExcludedRegions: []string{"ExcludedRegions_example"), FilterTags: []string{"FilterTags_example"), HostTags: []string{"HostTags_example"), RoleName: "RoleName_example", SecretAccessKey: "SecretAccessKey_example"} // AWSAccount | AWS Request Object

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSIntegrationApi.CreateAWSAccount(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSIntegrationApi.CreateAWSAccount``: %v\n", err)
Expand Down Expand Up @@ -96,14 +96,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := openapiclient.AWSAccount{AccessKeyId: "AccessKeyId_example", AccountId: "AccountId_example", AccountSpecificNamespaceRules: map[string]string{ "Key" = "Value" }, ExcludedRegions: []string{"ExcludedRegions_example"), FilterTags: []string{"FilterTags_example"), HostTags: []string{"HostTags_example"), RoleName: "RoleName_example", SecretAccessKey: "SecretAccessKey_example"} // AWSAccount | Your Datadog role delegation name. For more information about your AWS account Role name, see the [Datadog AWS integration configuration info](https://github.com/DataDog/documentation/blob/master/integrations/amazon_web_services/#installation).
body := datadog.AWSAccount{AccessKeyId: "AccessKeyId_example", AccountId: "AccountId_example", AccountSpecificNamespaceRules: map[string]string{ "Key" = "Value" }, ExcludedRegions: []string{"ExcludedRegions_example"), FilterTags: []string{"FilterTags_example"), HostTags: []string{"HostTags_example"), RoleName: "RoleName_example", SecretAccessKey: "SecretAccessKey_example"} // AWSAccount | Your Datadog role delegation name. For more information about your AWS account Role name, see the [Datadog AWS integration configuration info](https://github.com/DataDog/documentation/blob/master/integrations/amazon_web_services/#installation).

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSIntegrationApi.CreateNewAWSExternalID(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSIntegrationApi.CreateNewAWSExternalID``: %v\n", err)
Expand Down Expand Up @@ -162,14 +162,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := // AWSAccount | AWS request object

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSIntegrationApi.DeleteAWSAccount(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSIntegrationApi.DeleteAWSAccount``: %v\n", err)
Expand Down Expand Up @@ -228,16 +228,16 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
accountId := "accountId_example" // string | Only return AWS accounts that matches this `account_id`. (optional)
roleName := "roleName_example" // string | Only return AWS accounts that matches this role_name. (optional)
accessKeyId := "accessKeyId_example" // string | Only return AWS accounts that matches this `access_key_id`. (optional)

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSIntegrationApi.ListAWSAccounts(context.Background(), ).AccountId(accountId).RoleName(roleName).AccessKeyId(accessKeyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSIntegrationApi.ListAWSAccounts``: %v\n", err)
Expand Down Expand Up @@ -298,13 +298,13 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSIntegrationApi.ListAvailableAWSNamespaces(context.Background(), ).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSIntegrationApi.ListAvailableAWSNamespaces``: %v\n", err)
Expand Down Expand Up @@ -359,7 +359,7 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
Expand All @@ -368,8 +368,8 @@ func main() {
roleName := "roleName_example" // string | Only return AWS accounts that match this `role_name`. Required if `account_id` is specified. (optional)
accessKeyId := "accessKeyId_example" // string | Only return AWS accounts that matches this `access_key_id`. Required if none of the other two options are specified. (optional)

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSIntegrationApi.UpdateAWSAccount(context.Background(), body).AccountId(accountId).RoleName(roleName).AccessKeyId(accessKeyId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSIntegrationApi.UpdateAWSAccount``: %v\n", err)
Expand Down
50 changes: 25 additions & 25 deletions api/v1/datadog/docs/AWSLogsIntegrationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := openapiclient.AWSAccountAndLambdaRequest{AccountId: "AccountId_example", LambdaArn: "LambdaArn_example"} // AWSAccountAndLambdaRequest | Check AWS Log Lambda Async request body.
body := datadog.AWSAccountAndLambdaRequest{AccountId: "AccountId_example", LambdaArn: "LambdaArn_example"} // AWSAccountAndLambdaRequest | Check AWS Log Lambda Async request body.

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSLogsIntegrationApi.CheckAWSLogsLambdaAsync(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSLogsIntegrationApi.CheckAWSLogsLambdaAsync``: %v\n", err)
Expand Down Expand Up @@ -97,14 +97,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := openapiclient.AWSLogsServicesRequest{AccountId: "AccountId_example", Services: []string{"Services_example")} // AWSLogsServicesRequest | Check AWS Logs Async Services request body.
body := datadog.AWSLogsServicesRequest{AccountId: "AccountId_example", Services: []string{"Services_example")} // AWSLogsServicesRequest | Check AWS Logs Async Services request body.

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSLogsIntegrationApi.CheckAWSLogsServicesAsync(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSLogsIntegrationApi.CheckAWSLogsServicesAsync``: %v\n", err)
Expand Down Expand Up @@ -163,14 +163,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := openapiclient.AWSAccountAndLambdaRequest{AccountId: "AccountId_example", LambdaArn: "LambdaArn_example"} // AWSAccountAndLambdaRequest | AWS Log Lambda Async request body.
body := datadog.AWSAccountAndLambdaRequest{AccountId: "AccountId_example", LambdaArn: "LambdaArn_example"} // AWSAccountAndLambdaRequest | AWS Log Lambda Async request body.

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSLogsIntegrationApi.CreateAWSLambdaARN(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSLogsIntegrationApi.CreateAWSLambdaARN``: %v\n", err)
Expand Down Expand Up @@ -229,14 +229,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := // AWSAccountAndLambdaRequest | Delete AWS Lambda ARN request body.

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSLogsIntegrationApi.DeleteAWSLambdaARN(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSLogsIntegrationApi.DeleteAWSLambdaARN``: %v\n", err)
Expand Down Expand Up @@ -295,14 +295,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := openapiclient.AWSLogsServicesRequest{AccountId: "AccountId_example", Services: []string{"Services_example")} // AWSLogsServicesRequest | Enable AWS Log Services request body.
body := datadog.AWSLogsServicesRequest{AccountId: "AccountId_example", Services: []string{"Services_example")} // AWSLogsServicesRequest | Enable AWS Log Services request body.

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSLogsIntegrationApi.EnableAWSLogServices(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSLogsIntegrationApi.EnableAWSLogServices``: %v\n", err)
Expand Down Expand Up @@ -361,13 +361,13 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSLogsIntegrationApi.ListAWSLogsIntegrations(context.Background(), ).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSLogsIntegrationApi.ListAWSLogsIntegrations``: %v\n", err)
Expand Down Expand Up @@ -422,13 +422,13 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AWSLogsIntegrationApi.ListAWSLogsServices(context.Background(), ).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AWSLogsIntegrationApi.ListAWSLogsServices``: %v\n", err)
Expand Down
6 changes: 3 additions & 3 deletions api/v1/datadog/docs/AuthenticationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AuthenticationApi.Validate(context.Background(), ).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationApi.Validate``: %v\n", err)
Expand Down
34 changes: 17 additions & 17 deletions api/v1/datadog/docs/AzureIntegrationApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := openapiclient.AzureAccount{ClientId: "ClientId_example", ClientSecret: "ClientSecret_example", Errors: []string{"Errors_example"), HostFilters: "HostFilters_example", NewClientId: "NewClientId_example", NewTenantName: "NewTenantName_example", TenantName: "TenantName_example"} // AzureAccount | Create a Datadog-Azure integration for your Datadog account request body.
body := datadog.AzureAccount{ClientId: "ClientId_example", ClientSecret: "ClientSecret_example", Errors: []string{"Errors_example"), HostFilters: "HostFilters_example", NewClientId: "NewClientId_example", NewTenantName: "NewTenantName_example", TenantName: "TenantName_example"} // AzureAccount | Create a Datadog-Azure integration for your Datadog account request body.

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AzureIntegrationApi.CreateAzureIntegration(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AzureIntegrationApi.CreateAzureIntegration``: %v\n", err)
Expand Down Expand Up @@ -95,14 +95,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := openapiclient.AzureAccount{ClientId: "ClientId_example", ClientSecret: "ClientSecret_example", Errors: []string{"Errors_example"), HostFilters: "HostFilters_example", NewClientId: "NewClientId_example", NewTenantName: "NewTenantName_example", TenantName: "TenantName_example"} // AzureAccount | Delete a given Datadog-Azure integration request body.
body := datadog.AzureAccount{ClientId: "ClientId_example", ClientSecret: "ClientSecret_example", Errors: []string{"Errors_example"), HostFilters: "HostFilters_example", NewClientId: "NewClientId_example", NewTenantName: "NewTenantName_example", TenantName: "TenantName_example"} // AzureAccount | Delete a given Datadog-Azure integration request body.

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AzureIntegrationApi.DeleteAzureIntegration(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AzureIntegrationApi.DeleteAzureIntegration``: %v\n", err)
Expand Down Expand Up @@ -161,13 +161,13 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AzureIntegrationApi.ListAzureIntegration(context.Background(), ).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AzureIntegrationApi.ListAzureIntegration``: %v\n", err)
Expand Down Expand Up @@ -222,14 +222,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := // AzureAccount | Update a Datadog-Azure integration's host filters request body.

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AzureIntegrationApi.UpdateAzureHostFilters(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AzureIntegrationApi.UpdateAzureHostFilters``: %v\n", err)
Expand Down Expand Up @@ -288,14 +288,14 @@ import (
"context"
"fmt"
"os"
openapiclient "./openapi"
datadog "github.com/DataDog/datadog-api-client-go/api/v1/datadog"
)

func main() {
body := // AzureAccount | Update a Datadog-Azure integration request body.

configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
configuration := datadog.NewConfiguration()
api_client := datadog.NewAPIClient(configuration)
resp, r, err := api_client.AzureIntegrationApi.UpdateAzureIntegration(context.Background(), body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AzureIntegrationApi.UpdateAzureIntegration``: %v\n", err)
Expand Down
Loading