Skip to content

Commit

Permalink
T2 datadog 2021 03 02 (#17004)
Browse files Browse the repository at this point in the history
* CodeGen from PR 13146 in Azure/azure-rest-api-specs
[Datadog] Swagger correctness (#13146)

* test,version,CHANGELOG

* modify changelogreadmeversion

* modify version

* fix changelog date

* fix changelog

Co-authored-by: SDKAuto <sdkautomation@microsoft.com>
Co-authored-by: Yan Zhang (WICRESOFT NORTH AMERICA LTD) <v-yanzhang@microsoft.com>
Co-authored-by: 00Kai0 <sunkaihuisos@gmail.com>
  • Loading branch information
4 people authored Mar 2, 2021
1 parent 460768f commit 66cd060
Show file tree
Hide file tree
Showing 14 changed files with 1,170 additions and 128 deletions.
27 changes: 27 additions & 0 deletions sdk/datadog/azure-mgmt-datadog/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
# Release History

## 1.0.0b3 (2021-03-02)

**Features**

- Model DatadogOrganizationProperties has a new parameter application_key
- Model DatadogOrganizationProperties has a new parameter redirect_uri
- Model DatadogOrganizationProperties has a new parameter api_key
- Model MonitoringTagRulesProperties has a new parameter provisioning_state
- Model DatadogSingleSignOnProperties has a new parameter provisioning_state
- Added operation MarketplaceAgreementsOperations.create_or_update
- Added operation MonitorsOperations.list_monitored_resources
- Added operation MonitorsOperations.refresh_set_password_link
- Added operation MonitorsOperations.get_default_key
- Added operation MonitorsOperations.set_default_key
- Added operation MonitorsOperations.list_api_keys
- Added operation MonitorsOperations.list_hosts
- Added operation MonitorsOperations.list_linked_resources

**Breaking changes**

- Removed operation MarketplaceAgreementsOperations.create
- Removed operation group RefreshSetPasswordOperations
- Removed operation group HostsOperations
- Removed operation group ApiKeysOperations
- Removed operation group MonitoredResourcesOperations
- Removed operation group LinkedResourcesOperations

## 1.0.0b2 (2020-11-17)

**Features**
Expand Down
23 changes: 10 additions & 13 deletions sdk/datadog/azure-mgmt-datadog/azure/mgmt/datadog/_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,32 +8,33 @@
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true
"has_lro_operations": true,
"client_side_validation": true
},
"global_parameters": {
"sync_method": {
"sync": {
"credential": {
"method_signature": "credential, # type: \"TokenCredential\"",
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "The Microsoft Azure subscription ID.",
"docstring_type": "str",
"required": true
}
},
"async_method": {
"async": {
"credential": {
"method_signature": "credential, # type: \"AsyncTokenCredential\"",
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"method_signature": "subscription_id, # type: str",
"signature": "subscription_id, # type: str",
"description": "The Microsoft Azure subscription ID.",
"docstring_type": "str",
"required": true
Expand All @@ -51,13 +52,9 @@
"credential_key_header_name": null
},
"operation_groups": {
"api_keys": "ApiKeysOperations",
"hosts": "HostsOperations",
"linked_resources": "LinkedResourcesOperations",
"monitored_resources": "MonitoredResourcesOperations",
"operations": "Operations",
"marketplace_agreements": "MarketplaceAgreementsOperations",
"monitors": "MonitorsOperations",
"refresh_set_password": "RefreshSetPasswordOperations",
"operations": "Operations",
"tag_rules": "TagRulesOperations",
"single_sign_on_configurations": "SingleSignOnConfigurationsOperations"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@

from ._configuration import MicrosoftDatadogClientConfiguration
from .operations import MarketplaceAgreementsOperations
from .operations import ApiKeysOperations
from .operations import HostsOperations
from .operations import LinkedResourcesOperations
from .operations import MonitoredResourcesOperations
from .operations import Operations
from .operations import MonitorsOperations
from .operations import RefreshSetPasswordOperations
from .operations import Operations
from .operations import TagRulesOperations
from .operations import SingleSignOnConfigurationsOperations
from . import models
Expand All @@ -36,20 +31,10 @@ class MicrosoftDatadogClient(object):
:ivar marketplace_agreements: MarketplaceAgreementsOperations operations
:vartype marketplace_agreements: microsoft_datadog_client.operations.MarketplaceAgreementsOperations
:ivar api_keys: ApiKeysOperations operations
:vartype api_keys: microsoft_datadog_client.operations.ApiKeysOperations
:ivar hosts: HostsOperations operations
:vartype hosts: microsoft_datadog_client.operations.HostsOperations
:ivar linked_resources: LinkedResourcesOperations operations
:vartype linked_resources: microsoft_datadog_client.operations.LinkedResourcesOperations
:ivar monitored_resources: MonitoredResourcesOperations operations
:vartype monitored_resources: microsoft_datadog_client.operations.MonitoredResourcesOperations
:ivar operations: Operations operations
:vartype operations: microsoft_datadog_client.operations.Operations
:ivar monitors: MonitorsOperations operations
:vartype monitors: microsoft_datadog_client.operations.MonitorsOperations
:ivar refresh_set_password: RefreshSetPasswordOperations operations
:vartype refresh_set_password: microsoft_datadog_client.operations.RefreshSetPasswordOperations
:ivar operations: Operations operations
:vartype operations: microsoft_datadog_client.operations.Operations
:ivar tag_rules: TagRulesOperations operations
:vartype tag_rules: microsoft_datadog_client.operations.TagRulesOperations
:ivar single_sign_on_configurations: SingleSignOnConfigurationsOperations operations
Expand Down Expand Up @@ -77,24 +62,13 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.marketplace_agreements = MarketplaceAgreementsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.api_keys = ApiKeysOperations(
self._client, self._config, self._serialize, self._deserialize)
self.hosts = HostsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.linked_resources = LinkedResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.monitored_resources = MonitoredResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.monitors = MonitorsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.refresh_set_password = RefreshSetPasswordOperations(
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.tag_rules = TagRulesOperations(
self._client, self._config, self._serialize, self._deserialize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b2"
VERSION = "1.0.0b3"
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,8 @@

from ._configuration import MicrosoftDatadogClientConfiguration
from .operations import MarketplaceAgreementsOperations
from .operations import ApiKeysOperations
from .operations import HostsOperations
from .operations import LinkedResourcesOperations
from .operations import MonitoredResourcesOperations
from .operations import Operations
from .operations import MonitorsOperations
from .operations import RefreshSetPasswordOperations
from .operations import Operations
from .operations import TagRulesOperations
from .operations import SingleSignOnConfigurationsOperations
from .. import models
Expand All @@ -34,20 +29,10 @@ class MicrosoftDatadogClient(object):
:ivar marketplace_agreements: MarketplaceAgreementsOperations operations
:vartype marketplace_agreements: microsoft_datadog_client.aio.operations.MarketplaceAgreementsOperations
:ivar api_keys: ApiKeysOperations operations
:vartype api_keys: microsoft_datadog_client.aio.operations.ApiKeysOperations
:ivar hosts: HostsOperations operations
:vartype hosts: microsoft_datadog_client.aio.operations.HostsOperations
:ivar linked_resources: LinkedResourcesOperations operations
:vartype linked_resources: microsoft_datadog_client.aio.operations.LinkedResourcesOperations
:ivar monitored_resources: MonitoredResourcesOperations operations
:vartype monitored_resources: microsoft_datadog_client.aio.operations.MonitoredResourcesOperations
:ivar operations: Operations operations
:vartype operations: microsoft_datadog_client.aio.operations.Operations
:ivar monitors: MonitorsOperations operations
:vartype monitors: microsoft_datadog_client.aio.operations.MonitorsOperations
:ivar refresh_set_password: RefreshSetPasswordOperations operations
:vartype refresh_set_password: microsoft_datadog_client.aio.operations.RefreshSetPasswordOperations
:ivar operations: Operations operations
:vartype operations: microsoft_datadog_client.aio.operations.Operations
:ivar tag_rules: TagRulesOperations operations
:vartype tag_rules: microsoft_datadog_client.aio.operations.TagRulesOperations
:ivar single_sign_on_configurations: SingleSignOnConfigurationsOperations operations
Expand All @@ -74,24 +59,13 @@ def __init__(

client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
self._serialize = Serializer(client_models)
self._serialize.client_side_validation = False
self._deserialize = Deserializer(client_models)

self.marketplace_agreements = MarketplaceAgreementsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.api_keys = ApiKeysOperations(
self._client, self._config, self._serialize, self._deserialize)
self.hosts = HostsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.linked_resources = LinkedResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.monitored_resources = MonitoredResourcesOperations(
self._client, self._config, self._serialize, self._deserialize)
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.monitors = MonitorsOperations(
self._client, self._config, self._serialize, self._deserialize)
self.refresh_set_password = RefreshSetPasswordOperations(
self.operations = Operations(
self._client, self._config, self._serialize, self._deserialize)
self.tag_rules = TagRulesOperations(
self._client, self._config, self._serialize, self._deserialize)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,15 @@
# --------------------------------------------------------------------------

from ._marketplace_agreements_operations import MarketplaceAgreementsOperations
from ._api_keys_operations import ApiKeysOperations
from ._hosts_operations import HostsOperations
from ._linked_resources_operations import LinkedResourcesOperations
from ._monitored_resources_operations import MonitoredResourcesOperations
from ._operations import Operations
from ._monitors_operations import MonitorsOperations
from ._refresh_set_password_operations import RefreshSetPasswordOperations
from ._operations import Operations
from ._tag_rules_operations import TagRulesOperations
from ._single_sign_on_configurations_operations import SingleSignOnConfigurationsOperations

__all__ = [
'MarketplaceAgreementsOperations',
'ApiKeysOperations',
'HostsOperations',
'LinkedResourcesOperations',
'MonitoredResourcesOperations',
'Operations',
'MonitorsOperations',
'RefreshSetPasswordOperations',
'Operations',
'TagRulesOperations',
'SingleSignOnConfigurationsOperations',
]
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
accept = "application/json"

def prepare_request(next_link=None):
Expand All @@ -75,6 +76,7 @@ def prepare_request(next_link=None):
url = self._client.format_url(url, **path_format_arguments)
# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

request = self._client.get(url, query_parameters, header_parameters)
else:
Expand Down Expand Up @@ -108,7 +110,7 @@ async def get_next(next_link=None):
)
list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements'} # type: ignore

async def create(
async def create_or_update(
self,
body: Optional["_models.DatadogAgreementResource"] = None,
**kwargs
Expand All @@ -129,18 +131,20 @@ async def create(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-02-01-preview"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

# Construct URL
url = self.create.metadata['url'] # type: ignore
url = self.create_or_update.metadata['url'] # type: ignore
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
}
url = self._client.format_url(url, **path_format_arguments)

# Construct parameters
query_parameters = {} # type: Dict[str, Any]
query_parameters['api-version'] = self._serialize.query("api_version", api_version, 'str')

# Construct headers
header_parameters = {} # type: Dict[str, Any]
Expand Down Expand Up @@ -168,4 +172,4 @@ async def create(
return cls(pipeline_response, deserialized, {})

return deserialized
create.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements/default'} # type: ignore
create_or_update.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.Datadog/agreements/default'} # type: ignore
Loading

0 comments on commit 66cd060

Please sign in to comment.