Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
    asp asp
    @onenessboy_gitlab
    I mean to say activity log information
    Laurent Mazuel
    @lmazuel
    For backup, I saw you created a Github issue, please monitor there since I tagged the team responsible for that
    asp asp
    @onenessboy_gitlab
    @lmazuel Thank your for links and Github issue attention. Activity log shall give a try and shall wait for python sdk for taking azure backup :)
    at matter of suggestion, really would be happy to see more examples on related to python sdk, I see there are lot of REST API to get information what I need, but would like to see pythonic way :) This is just a suggestion, would love to use more python sdk for information analytics for our various reports
    asp asp
    @onenessboy_gitlab
    @lmazuel while i do python sdk for activity log its keep saying this error though i am giving range in correct time format explained in documentation $filter=eventTimestamp is not supported.
    need some guidance on this error..
    Laurent Mazuel
    @lmazuel
    I tagged the service team on your issue for ActivityLog :)
    asp asp
    @onenessboy_gitlab
    thank you @lmazuel
    asp asp
    @onenessboy_gitlab
    @lmazuel i have updated my sample code which i tried, now i am able to get logs, the issue is filter is not working and also the json output from that REST API is not parsable. Hope i will get some solution for this
    asp asp
    @onenessboy_gitlab
    @lmazuel for both cases activity log and creating a vault recovery backup for an azure vm, I am looking for python sdk to do the job instead of doing it via portal. Is that possible to create a use case and it test from Azure team please. I know documentation mentioned help to certain part, but it will be really good if git hub for python sdk have usecase template examples for these two activities ? . It would really help us to do some automation
    link given for vault backup initiation via python sdk, i dont find it relevant.. hmm.
    asp asp
    @onenessboy_gitlab
    However thanks for help :) learning a bit towards automation :)
    Laurent Mazuel
    @lmazuel
    Happy to help :). Please follow-up on your Github issues, and don't hesitate to open issues as necessary, that's why the Github tracker is here ;)
    asp asp
    @onenessboy_gitlab
    @lmazuel I am still waiting for some solution. we badly need some examples so that we can utilize. Hope github provides me some workable example. Especially now to automate backup and fetching backup related information like backupvault name, vault resource group name and policy name for a given VM. Created a new issue for this on github.
    Laurent Mazuel
    @lmazuel
    I can't do more myself unfortunately since I don't handle this service :(. If you don't get answer in a timely manner, you can always do a support ticket on the Azure Portal as well.
    asp asp
    @onenessboy_gitlab
    @lmazuel Its Ok. hmm. I understand there are poweshell way of doing things, but some how in our case instruction was to do in pythonic(more adoption due to integration reasons) way more and more activities..Hence the ask :), Shall wait for reply on Github..
    tomarv2
    @tomarv2
    running this as per example:
            # check if name is available
            availability = storage_client.storage_accounts.check_name_availability("storage_account_name")
    error:
    msrest.exceptions.SerializationError: 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'
    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!!