[Automation] Collect examples from azure-sdk-for-python#azure-mgmt-marketplaceordering_1.2.0b2
This commit is contained in:
Родитель
f2c4297791
Коммит
86fa41e18a
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b2/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
|
@ -0,0 +1,35 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.marketplaceordering import MarketplaceOrderingAgreements
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-marketplaceordering
|
||||
# USAGE
|
||||
python cancel_marketplace_terms.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = MarketplaceOrderingAgreements(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="subid",
|
||||
)
|
||||
|
||||
response = client.marketplace_agreements.cancel(
|
||||
publisher_id="pubid",
|
||||
offer_id="offid",
|
||||
plan_id="planid",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2021-01-01/examples/CancelMarketplaceTerms.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b2/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
|
@ -0,0 +1,35 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.marketplaceordering import MarketplaceOrderingAgreements
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-marketplaceordering
|
||||
# USAGE
|
||||
python get_agreement_marketplace_terms.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = MarketplaceOrderingAgreements(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="subid",
|
||||
)
|
||||
|
||||
response = client.marketplace_agreements.get_agreement(
|
||||
publisher_id="pubid",
|
||||
offer_id="offid",
|
||||
plan_id="planid",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2021-01-01/examples/GetAgreementMarketplaceTerms.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b1/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b2/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
|
@ -1,4 +1,5 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.marketplaceordering import MarketplaceOrderingAgreements
|
||||
|
||||
"""
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b1/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b2/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
|
@ -1,4 +1,5 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.marketplaceordering import MarketplaceOrderingAgreements
|
||||
|
||||
"""
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b1/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b2/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
|
@ -1,4 +1,5 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.marketplaceordering import MarketplaceOrderingAgreements
|
||||
|
||||
"""
|
||||
|
@ -6,7 +7,7 @@ from azure.mgmt.marketplaceordering import MarketplaceOrderingAgreements
|
|||
pip install azure-identity
|
||||
pip install azure-mgmt-marketplaceordering
|
||||
# USAGE
|
||||
python list_operations.py
|
||||
python operations_list.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b1/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
||||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b2/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
|
@ -1,4 +1,5 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.marketplaceordering import MarketplaceOrderingAgreements
|
||||
|
||||
"""
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{"sdkUrl": "https://github.com/Azure/azure-sdk-for-python/blob/azure-mgmt-marketplaceordering_1.2.0b2/sdk/marketplaceordering/azure-mgmt-marketplaceordering/README.md"}
|
|
@ -0,0 +1,35 @@
|
|||
from azure.identity import DefaultAzureCredential
|
||||
|
||||
from azure.mgmt.marketplaceordering import MarketplaceOrderingAgreements
|
||||
|
||||
"""
|
||||
# PREREQUISITES
|
||||
pip install azure-identity
|
||||
pip install azure-mgmt-marketplaceordering
|
||||
# USAGE
|
||||
python sign_marketplace_terms.py
|
||||
|
||||
Before run the sample, please set the values of the client ID, tenant ID and client secret
|
||||
of the AAD application as environment variables: AZURE_CLIENT_ID, AZURE_TENANT_ID,
|
||||
AZURE_CLIENT_SECRET. For more info about how to get the value, please see:
|
||||
https://docs.microsoft.com/azure/active-directory/develop/howto-create-service-principal-portal
|
||||
"""
|
||||
|
||||
|
||||
def main():
|
||||
client = MarketplaceOrderingAgreements(
|
||||
credential=DefaultAzureCredential(),
|
||||
subscription_id="subid",
|
||||
)
|
||||
|
||||
response = client.marketplace_agreements.sign(
|
||||
publisher_id="pubid",
|
||||
offer_id="offid",
|
||||
plan_id="planid",
|
||||
)
|
||||
print(response)
|
||||
|
||||
|
||||
# x-ms-original-file: specification/marketplaceordering/resource-manager/Microsoft.MarketplaceOrdering/stable/2021-01-01/examples/SignMarketplaceTerms.json
|
||||
if __name__ == "__main__":
|
||||
main()
|
Загрузка…
Ссылка в новой задаче