Skip to content

Commit

Permalink
Regenerate client from commit 28008cdb of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jan 31, 2024
1 parent 5d3e96a commit 00d10ca
Show file tree
Hide file tree
Showing 19 changed files with 346 additions and 15 deletions.
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": "2024-01-31 20:51:09.699607",
"spec_repo_commit": "e545b10b"
"regenerated": "2024-01-31 21:51:01.839882",
"spec_repo_commit": "28008cdb"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-01-31 20:51:09.736111",
"spec_repo_commit": "e545b10b"
"regenerated": "2024-01-31 21:51:01.854347",
"spec_repo_commit": "28008cdb"
}
}
}
12 changes: 12 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3207,6 +3207,18 @@ components:
key.'
example: https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL
type: string
cloud_run_revision_filters:
description: 'Limit the Cloud Run revisions that are pulled into Datadog
by using tags.

Only Cloud Run revision resources that apply to specified filters are
imported into Datadog.'
example:
- $KEY:$VALUE
items:
description: Cloud Run Filters
type: string
type: array
errors:
description: An array of errors.
example:
Expand Down
12 changes: 12 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7016,6 +7016,18 @@ components:
description: Your service account email address.
example: datadog-service-account@test-project.iam.gserviceaccount.com
type: string
cloud_run_revision_filters:
description: 'List of filters to limit the Cloud Run revisions that are
pulled into Datadog by using tags.

Only Cloud Run revision resources that apply to specified filters are
imported into Datadog.'
example:
- $KEY:$VALUE
items:
description: Cloud Run Filters
type: string
type: array
host_filters:
description: Your Host Filters.
items:
Expand Down
3 changes: 3 additions & 0 deletions examples/v1/gcp-integration/CreateGCPIntegration.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
client_id="163662907116366290710",
client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
host_filters="key:value,filter:example",
cloud_run_revision_filters=[
"dr:dre",
],
is_cspm_enabled=True,
is_security_command_center_enabled=True,
private_key="private_key",
Expand Down
34 changes: 34 additions & 0 deletions examples/v1/gcp-integration/UpdateGCPIntegration_3544259255.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
Update a GCP integration cloud run revision filters returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v1.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v1.model.gcp_account import GCPAccount

body = GCPAccount(
auth_provider_x509_cert_url="https://www.googleapis.com/oauth2/v1/certs",
auth_uri="https://accounts.google.com/o/oauth2/auth",
client_email="252bf553ef04b351@example.com",
client_id="163662907116366290710",
client_x509_cert_url="https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL",
host_filters="key:value,filter:example",
cloud_run_revision_filters=[
"merp:derp",
],
is_cspm_enabled=True,
is_security_command_center_enabled=True,
private_key="private_key",
private_key_id="123456789abcdefghi123456789abcdefghijklm",
project_id="datadog-apitest",
resource_collection_enabled=True,
token_uri="https://accounts.google.com/o/oauth2/token",
type="service_account",
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.update_gcp_integration(body=body)

print(response)
30 changes: 30 additions & 0 deletions examples/v2/gcp-integration/CreateGCPSTSAccount_194782945.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""
Create a new entry for your service account with cloud run revision filters enabled returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v2.model.gcp_service_account_type import GCPServiceAccountType
from datadog_api_client.v2.model.gcpsts_service_account_attributes import GCPSTSServiceAccountAttributes
from datadog_api_client.v2.model.gcpsts_service_account_create_request import GCPSTSServiceAccountCreateRequest
from datadog_api_client.v2.model.gcpsts_service_account_data import GCPSTSServiceAccountData

body = GCPSTSServiceAccountCreateRequest(
data=GCPSTSServiceAccountData(
attributes=GCPSTSServiceAccountAttributes(
cloud_run_revision_filters=[
"meh:bleh",
],
client_email="252bf553ef04b351@test-project.iam.gserviceaccount.com",
host_filters=[],
),
type=GCPServiceAccountType.GCP_SERVICE_ACCOUNT,
),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.create_gcpsts_account(body=body)

print(response)
34 changes: 34 additions & 0 deletions examples/v2/gcp-integration/UpdateGCPSTSAccount_2241994060.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
"""
Update STS Service Account returns "OK" response with cloud run revision filters
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.gcp_integration_api import GCPIntegrationApi
from datadog_api_client.v2.model.gcp_service_account_type import GCPServiceAccountType
from datadog_api_client.v2.model.gcpsts_service_account_attributes import GCPSTSServiceAccountAttributes
from datadog_api_client.v2.model.gcpsts_service_account_update_request import GCPSTSServiceAccountUpdateRequest
from datadog_api_client.v2.model.gcpsts_service_account_update_request_data import GCPSTSServiceAccountUpdateRequestData

# there is a valid "gcp_sts_account" in the system
GCP_STS_ACCOUNT_DATA_ID = environ["GCP_STS_ACCOUNT_DATA_ID"]

body = GCPSTSServiceAccountUpdateRequest(
data=GCPSTSServiceAccountUpdateRequestData(
attributes=GCPSTSServiceAccountAttributes(
client_email="252bf553ef04b351@example.com",
cloud_run_revision_filters=[
"merp:derp",
],
),
id=GCP_STS_ACCOUNT_DATA_ID,
type=GCPServiceAccountType.GCP_SERVICE_ACCOUNT,
),
)

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = GCPIntegrationApi(api_client)
response = api_instance.update_gcpsts_account(account_id=GCP_STS_ACCOUNT_DATA_ID, body=body)

print(response)
9 changes: 9 additions & 0 deletions src/datadog_api_client/v1/model/gcp_account.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ def openapi_types(_):
"client_email": (str,),
"client_id": (str,),
"client_x509_cert_url": (str,),
"cloud_run_revision_filters": ([str],),
"errors": ([str],),
"host_filters": (str,),
"is_cspm_enabled": (bool,),
Expand All @@ -42,6 +43,7 @@ def openapi_types(_):
"client_email": "client_email",
"client_id": "client_id",
"client_x509_cert_url": "client_x509_cert_url",
"cloud_run_revision_filters": "cloud_run_revision_filters",
"errors": "errors",
"host_filters": "host_filters",
"is_cspm_enabled": "is_cspm_enabled",
Expand All @@ -62,6 +64,7 @@ def __init__(
client_email: Union[str, UnsetType] = unset,
client_id: Union[str, UnsetType] = unset,
client_x509_cert_url: Union[str, UnsetType] = unset,
cloud_run_revision_filters: Union[List[str], UnsetType] = unset,
errors: Union[List[str], UnsetType] = unset,
host_filters: Union[str, UnsetType] = unset,
is_cspm_enabled: Union[bool, UnsetType] = unset,
Expand Down Expand Up @@ -96,6 +99,10 @@ def __init__(
where ``$CLIENT_EMAIL`` is the email found in your JSON service account key.
:type client_x509_cert_url: str, optional
:param cloud_run_revision_filters: Limit the Cloud Run revisions that are pulled into Datadog by using tags.
Only Cloud Run revision resources that apply to specified filters are imported into Datadog.
:type cloud_run_revision_filters: [str], optional
:param errors: An array of errors.
:type errors: [str], optional
Expand Down Expand Up @@ -139,6 +146,8 @@ def __init__(
kwargs["client_id"] = client_id
if client_x509_cert_url is not unset:
kwargs["client_x509_cert_url"] = client_x509_cert_url
if cloud_run_revision_filters is not unset:
kwargs["cloud_run_revision_filters"] = cloud_run_revision_filters
if errors is not unset:
kwargs["errors"] = errors
if host_filters is not unset:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ def openapi_types(_):
"account_tags": ([str],),
"automute": (bool,),
"client_email": (str,),
"cloud_run_revision_filters": ([str],),
"host_filters": ([str],),
"is_cspm_enabled": (bool,),
"is_security_command_center_enabled": (bool,),
Expand All @@ -30,6 +31,7 @@ def openapi_types(_):
"account_tags": "account_tags",
"automute": "automute",
"client_email": "client_email",
"cloud_run_revision_filters": "cloud_run_revision_filters",
"host_filters": "host_filters",
"is_cspm_enabled": "is_cspm_enabled",
"is_security_command_center_enabled": "is_security_command_center_enabled",
Expand All @@ -41,6 +43,7 @@ def __init__(
account_tags: Union[List[str], UnsetType] = unset,
automute: Union[bool, UnsetType] = unset,
client_email: Union[str, UnsetType] = unset,
cloud_run_revision_filters: Union[List[str], UnsetType] = unset,
host_filters: Union[List[str], UnsetType] = unset,
is_cspm_enabled: Union[bool, UnsetType] = unset,
is_security_command_center_enabled: Union[bool, UnsetType] = unset,
Expand All @@ -59,6 +62,10 @@ def __init__(
:param client_email: Your service account email address.
:type client_email: str, optional
:param cloud_run_revision_filters: List of filters to limit the Cloud Run revisions that are pulled into Datadog by using tags.
Only Cloud Run revision resources that apply to specified filters are imported into Datadog.
:type cloud_run_revision_filters: [str], optional
:param host_filters: Your Host Filters.
:type host_filters: [str], optional
Expand All @@ -77,6 +84,8 @@ def __init__(
kwargs["automute"] = automute
if client_email is not unset:
kwargs["client_email"] = client_email
if cloud_run_revision_filters is not unset:
kwargs["cloud_run_revision_filters"] = cloud_run_revision_filters
if host_filters is not unset:
kwargs["host_filters"] = host_filters
if is_cspm_enabled is not unset:
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2023-12-20T13:18:07.717Z
2024-01-31T21:16:03.254Z
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
interactions:
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"e5bbc86fb86ab202@example.com","client_id":"170307828717030782870","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","host_filters":"key:value,filter:example","is_cspm_enabled":true,"is_security_command_center_enabled":true,"private_key":"private_key","private_key_id":"123456789abcdefghi123456789abcdefghijklm","project_id":"datadog-apitest","resource_collection_enabled":true,"token_uri":"https://accounts.google.com/o/oauth2/token","type":"service_account"}'
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"3af93b0f1c973838@example.com","client_id":"170673576317067357630","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","cloud_run_revision_filters":["dr:dre"],"host_filters":"key:value,filter:example","is_cspm_enabled":true,"is_security_command_center_enabled":true,"private_key":"private_key","private_key_id":"123456789abcdefghi123456789abcdefghijklm","project_id":"datadog-apitest","resource_collection_enabled":true,"token_uri":"https://accounts.google.com/o/oauth2/token","type":"service_account"}'
headers:
accept:
- application/json
Expand All @@ -20,7 +20,7 @@ interactions:
code: 200
message: OK
- request:
body: '{"client_email":"e5bbc86fb86ab202@example.com","client_id":"170307828717030782870","project_id":"datadog-apitest"}'
body: '{"client_email":"3af93b0f1c973838@example.com","client_id":"170673576317067357630","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2024-01-31T21:16:03.829Z
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
interactions:
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"edcdf6542ac6e6b6@example.com","client_id":"170673576317067357630","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","host_filters":"key:value,filter:example","is_cspm_enabled":true,"is_security_command_center_enabled":true,"private_key":"private_key","private_key_id":"123456789abcdefghi123456789abcdefghijklm","project_id":"datadog-apitest","resource_collection_enabled":true,"token_uri":"https://accounts.google.com/o/oauth2/token","type":"service_account"}'
headers:
accept:
- application/json
content-type:
- application/json
method: POST
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
- request:
body: '{"auth_provider_x509_cert_url":"https://www.googleapis.com/oauth2/v1/certs","auth_uri":"https://accounts.google.com/o/oauth2/auth","client_email":"edcdf6542ac6e6b6@example.com","client_id":"170673576317067357630","client_x509_cert_url":"https://www.googleapis.com/robot/v1/metadata/x509/$CLIENT_EMAIL","cloud_run_revision_filters":["merp:derp"],"host_filters":"key:value,filter:example","is_cspm_enabled":true,"is_security_command_center_enabled":true,"private_key":"private_key","private_key_id":"123456789abcdefghi123456789abcdefghijklm","project_id":"datadog-apitest","resource_collection_enabled":true,"token_uri":"https://accounts.google.com/o/oauth2/token","type":"service_account"}'
headers:
accept:
- application/json
content-type:
- application/json
method: PUT
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
- request:
body: '{"client_email":"edcdf6542ac6e6b6@example.com","client_id":"170673576317067357630","project_id":"datadog-apitest"}'
headers:
accept:
- application/json
content-type:
- application/json
method: DELETE
uri: https://api.datadoghq.com/api/v1/integration/gcp
response:
body:
string: '{}
'
headers:
content-type:
- application/json
status:
code: 200
message: OK
version: 1
Loading

0 comments on commit 00d10ca

Please sign in to comment.