Skip to content

Commit

Permalink
CodeGen from PR 15838 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Update oauth flow (Azure#15838)

* Update deviceupdate.json

Updating OAuth flow in specification

* Update deviceupdate.json

Adding support for all OAuth2 flows.

* Updating URLs

* Another URL fix

* Fixing security values.

* Updating available Securities.
  • Loading branch information
SDKAuto committed Aug 31, 2021
1 parent 22d59ed commit e9ac33e
Show file tree
Hide file tree
Showing 6 changed files with 150 additions and 33 deletions.
1 change: 1 addition & 0 deletions sdk/deviceupdate/azure-iot-deviceupdate/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py
recursive-include samples *.py *.md
include *.md
Expand Down
11 changes: 11 additions & 0 deletions sdk/deviceupdate/azure-iot-deviceupdate/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"autorest": "3.4.5",
"use": [
"@autorest/[email protected]",
"@autorest/[email protected]"
],
"commit": "c36887cae37f99e0966efcb73006ebd736a77061",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/deviceupdate/data-plane/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.4.5",
"readme": "specification/deviceupdate/data-plane/readme.md"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
{
"chosen_version": "2020-09-01",
"total_api_version_list": ["2020-09-01"],
"client": {
"name": "DeviceUpdateClient",
"filename": "_device_update_client",
"description": "Device Update for IoT Hub is an Azure service that enables customers to publish update for their IoT devices to the cloud, and then deploy that update to their devices (approve updates to groups of devices managed and provisioned in IoT Hub). It leverages the proven security and reliability of the Windows Update platform, optimized for IoT devices. It works globally and knows when and how to update devices, enabling customers to focus on their business goals and let Device Update for IoT Hub handle the updates.",
"base_url": null,
"custom_base_url": "\u0027https://{accountEndpoint}\u0027",
"azure_arm": false,
"has_lro_operations": false,
"client_side_validation": false,
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"PipelineClient\"]}, \"local\": {\"._configuration\": [\"DeviceUpdateClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.core\": [\"AsyncPipelineClient\"]}, \"local\": {\"._configuration\": [\"DeviceUpdateClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"account_endpoint": {
"signature": "account_endpoint, # type: str",
"description": "Account endpoint.",
"docstring_type": "str",
"required": true
},
"instance_id": {
"signature": "instance_id, # type: str",
"description": "Account instance identifier.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential: \"AsyncTokenCredential\",",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"account_endpoint": {
"signature": "account_endpoint: str,",
"description": "Account endpoint.",
"docstring_type": "str",
"required": true
},
"instance_id": {
"signature": "instance_id: str,",
"description": "Account instance identifier.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, account_endpoint, instance_id",
"service_client_specific": {
"sync": {
"api_version": {
"signature": "api_version=None, # type: Optional[str]",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
},
"async": {
"api_version": {
"signature": "api_version: Optional[str] = None,",
"description": "API version to use if no profile is provided, or if missing in profile.",
"docstring_type": "str",
"required": false
},
"profile": {
"signature": "profile: KnownProfiles = KnownProfiles.default,",
"description": "A profile definition, from KnownProfiles to dict.",
"docstring_type": "azure.profiles.KnownProfiles",
"required": false
}
}
}
},
"config": {
"credential": true,
"credential_scopes": ["https://api.adu.microsoft.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null,
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"updates": "UpdatesOperations",
"devices": "DevicesOperations",
"deployments": "DeploymentsOperations"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:
def get_all_deployments(
self,
filter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfDeployments"]:
"""Gets a list of deployments.
Expand Down Expand Up @@ -119,7 +119,7 @@ async def get_next(next_link=None):
async def get_deployment(
self,
deployment_id: str,
**kwargs
**kwargs: Any
) -> "_models.Deployment":
"""Gets the properties of a deployment.
Expand Down Expand Up @@ -173,7 +173,7 @@ async def create_or_update_deployment(
self,
deployment_id: str,
deployment: "_models.Deployment",
**kwargs
**kwargs: Any
) -> "_models.Deployment":
"""Creates or updates a deployment.
Expand Down Expand Up @@ -233,7 +233,7 @@ async def create_or_update_deployment(
async def delete_deployment(
self,
deployment_id: str,
**kwargs
**kwargs: Any
) -> None:
"""Deletes a deployment.
Expand Down Expand Up @@ -281,7 +281,7 @@ async def delete_deployment(
async def get_deployment_status(
self,
deployment_id: str,
**kwargs
**kwargs: Any
) -> "_models.DeploymentStatus":
"""Gets the status of a deployment including a breakdown of how many devices in the deployment are
in progress, completed, or failed.
Expand Down Expand Up @@ -336,7 +336,7 @@ def get_deployment_devices(
self,
deployment_id: str,
filter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfDeploymentDeviceStates"]:
"""Gets a list of devices in a deployment along with their state. Useful for getting a list of
failed devices.
Expand Down Expand Up @@ -417,7 +417,7 @@ async def get_next(next_link=None):
async def cancel_deployment(
self,
deployment_id: str,
**kwargs
**kwargs: Any
) -> "_models.Deployment":
"""Cancels a deployment.
Expand Down Expand Up @@ -472,7 +472,7 @@ async def cancel_deployment(
async def retry_deployment(
self,
deployment_id: str,
**kwargs
**kwargs: Any
) -> "_models.Deployment":
"""Retries a deployment with failed devices.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __init__(self, client, config, serializer, deserializer) -> None:

def get_all_device_classes(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfDeviceClasses"]:
"""Gets a list of all device classes (unique combinations of device manufacturer and model) for
all devices connected to Device Update for IoT Hub.
Expand Down Expand Up @@ -114,7 +114,7 @@ async def get_next(next_link=None):
async def get_device_class(
self,
device_class_id: str,
**kwargs
**kwargs: Any
) -> "_models.DeviceClass":
"""Gets the properties of a device class.
Expand Down Expand Up @@ -167,7 +167,7 @@ async def get_device_class(
def get_device_class_device_ids(
self,
device_class_id: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfStrings"]:
"""Gets a list of device identifiers in a device class.
Expand Down Expand Up @@ -242,7 +242,7 @@ async def get_next(next_link=None):
def get_device_class_installable_updates(
self,
device_class_id: str,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfUpdateIds"]:
"""Gets a list of installable updates for a device class.
Expand Down Expand Up @@ -317,7 +317,7 @@ async def get_next(next_link=None):
def get_all_devices(
self,
filter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfDevices"]:
"""Gets a list of devices connected to Device Update for IoT Hub.
Expand Down Expand Up @@ -392,7 +392,7 @@ async def get_next(next_link=None):
async def get_device(
self,
device_id: str,
**kwargs
**kwargs: Any
) -> "_models.Device":
"""Gets the device properties and latest deployment status for a device connected to Device Update
for IoT Hub.
Expand Down Expand Up @@ -445,7 +445,7 @@ async def get_device(

async def get_update_compliance(
self,
**kwargs
**kwargs: Any
) -> "_models.UpdateCompliance":
"""Gets the breakdown of how many devices are on their latest update, have new updates available,
or are in progress receiving new updates.
Expand Down Expand Up @@ -495,7 +495,7 @@ async def get_update_compliance(

def get_all_device_tags(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfDeviceTags"]:
"""Gets a list of available group device tags for all devices connected to Device Update for IoT
Hub.
Expand Down Expand Up @@ -567,7 +567,7 @@ async def get_next(next_link=None):
async def get_device_tag(
self,
tag_name: str,
**kwargs
**kwargs: Any
) -> "_models.DeviceTag":
"""Gets a count of how many devices have a device tag.
Expand Down Expand Up @@ -619,7 +619,7 @@ async def get_device_tag(

def get_all_groups(
self,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfGroups"]:
"""Gets a list of all device groups.
Expand Down Expand Up @@ -690,7 +690,7 @@ async def get_next(next_link=None):
async def get_group(
self,
group_id: str,
**kwargs
**kwargs: Any
) -> "_models.Group":
"""Gets the properties of a group.
Expand Down Expand Up @@ -744,7 +744,7 @@ async def create_or_update_group(
self,
group_id: str,
group: "_models.Group",
**kwargs
**kwargs: Any
) -> "_models.Group":
"""Create or update a device group.
Expand Down Expand Up @@ -804,7 +804,7 @@ async def create_or_update_group(
async def delete_group(
self,
group_id: str,
**kwargs
**kwargs: Any
) -> None:
"""Deletes a device group.
Expand Down Expand Up @@ -852,7 +852,7 @@ async def delete_group(
async def get_group_update_compliance(
self,
group_id: str,
**kwargs
**kwargs: Any
) -> "_models.UpdateCompliance":
"""Get group update compliance information such as how many devices are on their latest update,
how many need new updates, and how many are in progress on receiving a new update.
Expand Down Expand Up @@ -907,7 +907,7 @@ def get_group_best_updates(
self,
group_id: str,
filter: Optional[str] = None,
**kwargs
**kwargs: Any
) -> AsyncIterable["_models.PageableListOfUpdatableDevices"]:
"""Get the best available updates for a group and a count of how many devices need each update.
Expand Down
Loading

0 comments on commit e9ac33e

Please sign in to comment.