Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CodeGen from PR 13833 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
datashare readme t2 config (Azure#13833)
SDKAuto committed Apr 12, 2021

Verified

This commit was signed with the committer’s verified signature.
mifi Mikael Finstad
1 parent 6f4a33e commit bee05c8
Showing 34 changed files with 1,612 additions and 572 deletions.
1 change: 1 addition & 0 deletions sdk/datashare/azure-mgmt-datashare/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
include _meta.json
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
8 changes: 8 additions & 0 deletions sdk/datashare/azure-mgmt-datashare/_meta.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"autorest": "3.0.6369",
"use": "@autorest/[email protected]",
"commit": "36084f10aacb98d77af2f67c9d57fca2bbe68e97",
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
"autorest_command": "autorest specification/datashare/resource-manager/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] --version=3.0.6369",
"readme": "specification/datashare/resource-manager/readme.md"
}
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2019-11-01"
self.api_version = "2020-09-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-datashare/{}'.format(VERSION))
self._configure(**kwargs)
120 changes: 120 additions & 0 deletions sdk/datashare/azure-mgmt-datashare/azure/mgmt/datashare/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"chosen_version": "2020-09-01",
"total_api_version_list": ["2020-09-01"],
"client": {
"name": "DataShareManagementClient",
"filename": "_data_share_management_client",
"description": "Creates a Microsoft.DataShare management client.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"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.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataShareManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}",
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"DataShareManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}}}"
},
"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
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "The subscription 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
},
"subscription_id": {
"signature": "subscription_id: str,",
"description": "The subscription identifier.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_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
},
"base_url": {
"signature": "base_url=None, # type: Optional[str]",
"description": "Service URL",
"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
},
"base_url": {
"signature": "base_url: Optional[str] = None,",
"description": "Service URL",
"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://management.azure.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\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"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\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
},
"operation_groups": {
"accounts": "AccountsOperations",
"consumer_invitations": "ConsumerInvitationsOperations",
"data_sets": "DataSetsOperations",
"data_set_mappings": "DataSetMappingsOperations",
"invitations": "InvitationsOperations",
"operations": "Operations",
"shares": "SharesOperations",
"provider_share_subscriptions": "ProviderShareSubscriptionsOperations",
"share_subscriptions": "ShareSubscriptionsOperations",
"consumer_source_data_sets": "ConsumerSourceDataSetsOperations",
"synchronization_settings": "SynchronizationSettingsOperations",
"triggers": "TriggersOperations"
},
"operation_mixins": {
"sync_imports": "None",
"async_imports": "None",
"operations": {
}
}
}
Original file line number Diff line number Diff line change
@@ -6,5 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b1"

VERSION = "2019-11-01T00:00:00.000Z"
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2019-11-01"
self.api_version = "2020-09-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-datashare/{}'.format(VERSION))
self._configure(**kwargs)
Original file line number Diff line number Diff line change
@@ -64,7 +64,7 @@ def list_by_subscription(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-09-01"
accept = "application/json"

def prepare_request(next_link=None):
@@ -106,7 +106,7 @@ async def get_next(next_link=None):
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize(_models.DataShareError, response)
error = self._deserialize.failsafe_deserialize(_models.DataShareError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

@@ -141,7 +141,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-09-01"
accept = "application/json"

# Construct URL
@@ -167,7 +167,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.DataShareError, response)
error = self._deserialize.failsafe_deserialize(_models.DataShareError, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('Account', pipeline_response)
@@ -190,7 +190,7 @@ async def _create_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-09-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

@@ -221,7 +221,7 @@ async def _create_initial(

if response.status_code not in [200, 201]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.DataShareError, response)
error = self._deserialize.failsafe_deserialize(_models.DataShareError, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if response.status_code == 200:
@@ -255,8 +255,8 @@ async def begin_create(
:type account: ~azure.mgmt.datashare.models.Account
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either Account or the result of cls(response)
@@ -320,7 +320,7 @@ async def _delete_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-09-01"
accept = "application/json"

# Construct URL
@@ -346,7 +346,7 @@ async def _delete_initial(

if response.status_code not in [200, 202, 204]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.DataShareError, response)
error = self._deserialize.failsafe_deserialize(_models.DataShareError, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = None
@@ -375,8 +375,8 @@ async def begin_delete(
:type account_name: str
:keyword callable cls: A custom type or function that will be passed the direct response
:keyword str continuation_token: A continuation token to restart a poller from a saved state.
:keyword polling: True for ARMPolling, False for no polling, or a
polling object for personal polling strategy
:keyword polling: Pass in True if you'd like the AsyncARMPolling polling method,
False for no polling, or your own initialized polling object for a personal polling strategy.
:paramtype polling: bool or ~azure.core.polling.AsyncPollingMethod
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no Retry-After header is present.
:return: An instance of AsyncLROPoller that returns either OperationResponse or the result of cls(response)
@@ -455,7 +455,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-09-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

@@ -486,7 +486,7 @@ async def update(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.DataShareError, response)
error = self._deserialize.failsafe_deserialize(_models.DataShareError, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('Account', pipeline_response)
@@ -521,7 +521,7 @@ def list_by_resource_group(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-09-01"
accept = "application/json"

def prepare_request(next_link=None):
@@ -564,7 +564,7 @@ async def get_next(next_link=None):
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize(_models.DataShareError, response)
error = self._deserialize.failsafe_deserialize(_models.DataShareError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

Original file line number Diff line number Diff line change
@@ -62,7 +62,7 @@ def list_invitations(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-09-01"
accept = "application/json"

def prepare_request(next_link=None):
@@ -100,7 +100,7 @@ async def get_next(next_link=None):
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize(_models.DataShareError, response)
error = self._deserialize.failsafe_deserialize(_models.DataShareError, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

@@ -109,7 +109,7 @@ async def get_next(next_link=None):
return AsyncItemPaged(
get_next, extract_data
)
list_invitations.metadata = {'url': '/providers/Microsoft.DataShare/ListInvitations'} # type: ignore
list_invitations.metadata = {'url': '/providers/Microsoft.DataShare/listInvitations'} # type: ignore

async def get(
self,
@@ -135,7 +135,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-09-01"
accept = "application/json"

# Construct URL
@@ -160,7 +160,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.DataShareError, response)
error = self._deserialize.failsafe_deserialize(_models.DataShareError, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('ConsumerInvitation', pipeline_response)
@@ -195,7 +195,7 @@ async def reject_invitation(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2019-11-01"
api_version = "2020-09-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

@@ -224,7 +224,7 @@ async def reject_invitation(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(_models.DataShareError, response)
error = self._deserialize.failsafe_deserialize(_models.DataShareError, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('ConsumerInvitation', pipeline_response)
@@ -233,4 +233,4 @@ async def reject_invitation(
return cls(pipeline_response, deserialized, {})

return deserialized
reject_invitation.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/RejectInvitation'} # type: ignore
reject_invitation.metadata = {'url': '/providers/Microsoft.DataShare/locations/{location}/rejectInvitation'} # type: ignore
Loading

0 comments on commit bee05c8

Please sign in to comment.