Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    Laurent Mazuel
    @lmazuel

    Hi @tomarv2 , I'm not directly working on Mgmt anymore, but I looked at the SDK and indeed you need now to wrap the string with the type StorageAccountCheckNameAvailabilityParameters:

    availability = storage_client.storage_accounts.check_name_availability(StorageAccountCheckNameAvailabilityParameters("storage_account_name"))

    If you found an incorrect sample, please create an issue on Github so I can tag the right team on it to fix it. https://github.com/Azure/azure-sdk-for-python/issues
    Thanks!

    Sakar
    @sakar97
    Hi, I was wondering whether azure has python SDK for API management or not. If there are some SDKs or APIs then please help me in providing some references. Thanks
    Laurent Mazuel
    @lmazuel
    If you don't find what you are looking for, please open an issue on the issue tracker on Github, so I can tag the APIMgmt team on it. Thanks!
    Sakar
    @sakar97
    @lmazuel Thank you so much, It helped me.
    zimmdi
    @zimmdi
    Hi,
    does any of you know if it is possible to make a docker image immutable via python on ACR? Which class and method do i need to use? Currently i am at ContainerRegistryManagementClient but is this the right direction?
    Sakar
    @sakar97
    Hi, I am trying to use azure-mgmt-apimanagement SDK , specifically the api-operations class. When I am using the create_or_update function then the SDK gives an error of Api not found. Instead of creating a new API instance, the function is trying to update the value. Can anyone help me with this? sdk link: https://azuresdkdocs.blob.core.windows.net/$web/python/azure-mgmt-apimanagement/0.1.0/azure.mgmt.apimanagement.operations.html#azure.mgmt.apimanagement.operations.ApiOperations
    ianrocha
    @ianrocha
    image.png
    Hi! I am trying to use azure-servicebus-management-client to create a subscription with the parameter 'forward_to' and I keep getting "Missing Token" error. Can anyone help me?
    the print is from the erro I mentioned
    I already tried to create the client from connection_string and using credential+fully_qualified_namespace, and I get the same error in both ways
    oh, btw, I using the version 7.0.0 of the package azure-servicebus and python3.9
    Adam Ling (MSFT)
    @yunhaoling
    Hey @ianrocha , we confirmed it's a bug in the ServiceBusAdministrationClient that forward_to requires additional bearer token headers to be provided. We have fixed the bug in the PR:Azure/azure-sdk-for-python#15610. The fix will be carried in our next release.
    ianrocha
    @ianrocha
    thanks very much @yunhaoling!!!
    qaiser21
    @qaiser21

    I am using azure-storage-file-datalake package to connect with ADLS gen2

    from azure.identity import ClientSecretCredential
    
    # service principal credential
    tenant_id = 'xxxxxxx'
    client_id = 'xxxxxxxxx'
    client_secret = 'xxxxxxxx'
    storage_account_name = 'xxxxxxxx'
    
    credential = ClientSecretCredential(tenant_id, client_id, client_secret)
    
    service_client = DataLakeServiceClient(account_url="{}://{}.dfs.core.windows.net".format(
            "https", storage_account_name), credential=credential) # I have also tried blob instead of dfs in account_url

    Folder structure in ADLS gen2 from where I have to read parquet file look like this. Inside container of ADLS gen2 we folder_a which contain folder_b in which there is parquet file.

    folder_a
      |-folder_b
          parquet_file1

    from gen1 storage we used to read parquet file like this.

    from azure.datalake.store import lib
    from azure.datalake.store.core import AzureDLFileSystem
    import pyarrow.parquet as pq
    
    adls = lib.auth(tenant_id=directory_id,
                client_id=app_id,
                client_secret=app_key)
    adl = AzureDLFileSystem(adls, store_name=adls_name) 
    
    f = adl.open(file, 'rb') # 'file is parquet file with path of parquet file folder_a/folder_b/parquet_file1'
    table = pq.read_table(f)

    How do we proceed with gen2 storage, we are stuck at this point

    http://peter-hoffmann.com/2020/azure-data-lake-storage-gen-2-with-python.html is the link that we have followed.

    Note - We are not using databrick to do this

    Any help will be appreciated
    Laurent Mazuel
    @lmazuel

    Hi @qaiser21 , did you check the samples folder on the repo?
    https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-file-datalake/samples

    I don't have Storage representative that I can easily talk to Gitter, if we are missing a sample, could you create a bug on Github? https://github.com/Azure/azure-sdk-for-python/issues

    eaglezzb
    @eaglezzb
    Dear ALL;
    when azure SDK for python update
    how to we can fixed the old API and example
    we found our old productuon code can't work when SDK
    update ?
    appreciate Thanks
    where we can find the latest sample ?
    5 replies
    raphaelauv
    @raphaelauv

    Hi !

    I would like to produce custom metric from python code

    I dont find example or documentation for AZURE ( it's very easy for aws -> https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/publishingMetrics.html )

    Could you help me find an exemple ?

    thank you !!!!

    Ivan Trusov
    @renardeinside

    Hi,

    I'm trying to use AzureDatabricksLinkedService from azure-mgmt-datafactory==1.0.0 package.

    I've met two problems:

    1. No MSI authentication supported.
    2. When I'm trying to create a new linked service, I receive the following error:
      azure.core.exceptions.HttpResponseError: Operation returned an invalid status 'Bad Request'
      It's hard to understand the exact problem via this error message.

    Any advisory on these issues would be really appreciated.

    Juan Ramos
    @ptjuanramos
    Hi there, do you guys know if this command: az storage queue create, creates an queue if doesn't exist or recreates it
    Kannadasan S
    @Kannadasan89
    Hi, I am trying to use apim python module to automate api creation in apim, but i am getting an error, Could any one help on this?
    Error:
    
       self._token = self._credential.get_token(*self._scopes)
    AttributeError: 'AzureSasCredential' object has no attribute 'get_token'
    Code:
    
    credentials = AzureSasCredential(sas)
    apim_client = ApiManagementClient(credential=credentials, subscription_id=subscription_id, base_url=base_url)
    api_operation_operations = apim_client.api_operation.create_or_update(resource_group_name=resource_group_name, service_name=service_name,
                                                api_id=api_id, operation_id=operation_id, parameters=operation_contract)
    Laurent Mazuel
    @lmazuel
    Hi @Kannadasan89 , can you tell us where you get AzureSasCredential from? You must use credentials from azure-identity: https://pypi.org/project/azure-identity/
    Ashok Rawat
    @ashokf458

    Hi Everyone,
    I seems to be facing an issue with creating a managed_disk or snapshot from scratch disk of a VM, using begin_create_or_update function and am getting the following error:

    Error message was: Unable to build a model: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get', DeserializationError: Unable to deserialize to object: type, AttributeError: 'str' object has no attribute 'get'

    I have seen a similar error to this earlier last year on this forum. Are they related or is this specific to each entity on Azure?

    Thanks!!

    jk35
    @jk35:matrix.org
    [m]
    Can't get the subnet id of azure using python
    HttpResponseError: (InvalidApiVersionParameter) The api-version '2021-02-01' is invalid
    try other versions as well
    tried*
    palvors
    @palvors
    Hi, anyone know where I can find the list of models ( NN) use it for azure.cognitiveservices.vision.customvision.training.models ? I 'm looking for into the file "azure.cognitiveservices.vision.customvision.training.models"
    Michael Butak
    @mikebutak
    Hi all, I used the azure sdk for python in the past, but never for creating subscriptions. Is that a supported function of the sdk? I have been searching for docs or examples and most of the links on the topic are broken. Any pointers? Thanks!
    Yizhak Orfanian
    @itzikorfa
    Hi,
    I use the azure python SDK to automate deployment, I use the blobserviceclient start_copy_from_url, the issue is that he request put the destination file in pending. is there a way to check if the blob was copied and ready?
    Yiming Lei
    @RAY-316
    @mikebutak As the basic credentials for azure SDK, you may prefer to create subscriptions manually on azure-portal
    Hi @jk35:matrix.org , can you describe in more detail the package name and version you use?
    superelitist
    @superelitist:matrix.org
    [m]

    Hey guys, I'm trying to start using the Entity Tag feature to ensure our transactions are properly isolated. I've been trying to use the documentation at https://azuresdkdocs.blob.core.windows.net/$web/python/azure-cosmos/4.0.0/azure.cosmos.html#azure.cosmos.container.ContainerProxy.replace_item and it defines an etag keyword argument and a match_condition argument. The match_condition argument must apparently be present when the etag argument is present, and takes an azure.core.MatchConditions enum (an int from 1-5...).

    Unfortunately, I can't find any documentation on what the various MatchConditions options actually do...

    There is a page that describes the enum (https://azuresdkdocs.blob.core.windows.net/$web/python/azure-core/1.1.1/azure.core.html#azure.core.MatchConditions) but it doesn't elaborate on what IfMissing, IfModified etc. actually mean.

    To make matters murkier, I tried simply using the IfPresent value just to see what would happen, and got a completely unexpected exception: TypeError("request() got an unexpected keyword argument 'etag'"), which doesn't make any sense: why would the etag be unexpected in this case?

    Can anyone shed some light on this?

    Michael Butak
    @mikebutak

    Hello.

    I'm trying to get started with the azure.mgmt.logic library. When I run the script I get ValueError: Invalid tenant id provided. You can locate your tenant id by following the instructions here: https://docs.microsoft.com/partner-center/find-ids-and-domain-names. However, I am quite confident my tenant id is correct. I'm using it elsewhere and I've doublechecked no trailing spaces, etc. in the env var it's stored in. Any pointers?

    Michael Butak
    @mikebutak
    I wonder if it could be a case of misleading error message.
    Nick Lang
    @fxdgear
    I'm trying to follow some sort of "getting started" guide for how to query a list of subscriptions from Azure. But all the links I follow end up being redirects to something else..
    but when i try to figure out how to create credentials there's nothing straight forward... I feel like I'm gonna spend a day just trying to figure out the eco system when all i need is 3 lines of code...
    Nick Lang
    @fxdgear

    ok so i got my auth working :)

    But now the problem is when I get my subscrtions the tags attribute is empty and I did put tags on my subscriptions.

    preeteshsh
    @preeteshsh
    Hello, I am trying to resize virtual machine size need to know which library shall I use for this?
    2 replies
    lerrai
    @lerrai
    is it possible to set custom cron for running daily cost export?
    Ashu
    @AshuR1211
    Hi Team. Is there any way I can trigger Azure pipeline with parameters using python
    Lekesh Kumar
    @lekesh
    Hi all. Is it possible to query Change Feed from a specific date and time in python? If yes, please help me with an example code. The documentation doesn't seem to be clear.