Azure Provider

Provide the classes to associate a VHD image into a product on Azure Marketplace.

Note

The current implementation of AzureProvider follows the Product Ingestion API compatible with the version 2022-07-01, which is the default value set in the factory make_graph_api_session().

Index:

Providers

class cloudpub.ms_azure.AzurePublishingMetadata(disk_version, sku_id=None, generation='V2', support_legacy=False, recommended_sizes=None, **kwargs)[source]

A collection of metadata necessary for publishing a VHD Image into a product.

__init__(disk_version, sku_id=None, generation='V2', support_legacy=False, recommended_sizes=None, **kwargs)[source]

Create a new AzurePublishingMetadata object.

Parameters:
  • disk_version (str) – The disk version in the format {int}.{int}.{int}

  • sku_id (str, optional) – The SKU ID to associate this image with. Defaults to the plan name.

  • generation (str, optional) – The VM image generation. Defaults to V2

  • support_legacy (bool, optional) – If the V2 VM image also supports V1 (legacy generation)

  • recommended_sizes (list, optional) – The recommended sizes for the virtual machine.

  • legacy_sku_id (str, optional) – Only required when support_legacy == True. The SKU ID for Gen1. Defaults to {sku_id}-gen1

  • **kwargs – Arguments for PublishingMetadata.

class cloudpub.ms_azure.AzureService(credentials)[source]

Service provider for Microsoft Azure using the Product Ingestion API.

__init__(credentials)[source]

Create a new AuzureService object.

Parameters:

credentials (dict) – Dictionary with Azure credentials to authenticate on Product Ingestion API.

configure(resource)[source]

Create or update a resource and wait until it’s done.

Parameters:

resource (AzureResource) – The resource to create/modify in Azure.

Returns:

The result of job execution

Return type:

dict

diff_offer(product, first_target='preview')[source]

Compute the difference between the provided product and the one in the remote.

Parameters:
  • product (Product) – The local product to diff with the remote one.

  • first_target (str) – The first target to lookup into. Defaults to preview.

Returns:

The diff data.

Return type:

DeepDiff

ensure_can_publish(product_id)[source]

Ensure the offer is not already being published.

It will wait for up to 7 days retrying to make sure it’s possible to publish before giving up and raising.

Parameters:

product_id (str) – The product ID to check the offer’s publishing status

Raises:

RuntimeError – whenever a publishing is already in progress.

Return type:

None

filter_product_resources(product, resource)[source]

Return a subset of Product resources with the corresponding type.

Parameters:
  • product (Product) – The product to retrieve the resources from.

  • resource (str) – The resource type

Returns:

The subset of resources by the given type

Return type:

list

get_plan_by_name(product, plan_name)[source]

Return the respective plan by searching for its name.

Parameters:
  • product (Product) – The product to retrieve the plans from.

  • plan_name (str) – The plan name to filter

Returns:

The respective plan summary when found

Return type:

PlanSummary

get_plan_tech_config(product, plan)[source]

Return the VMIPlanTechConfig resource for the given product/plan.

Parameters:
  • product (Product) – The product with all resources to retrieve the technical confuguration.

  • plan (PlanSummary) – The plan match the technical configuration.

Return type:

VMIPlanTechConfig

Returns:

The technical configuration for the requested product/plan.

get_product(product_id, first_target='preview')[source]

Return the requested Product by its ID.

It will return the product with the latest publishing status, trying to fetch it in the following order: “preview” -> “draft” -> “live”. The first status to fech must be “preview” in order to indepotently detect an existing publishing which could be missing to go live.

Parameters:
  • product_durable_id (str) – The product UUID

  • first_target (str, optional) – The first target to lookup into. Defaults to preview.

Returns:

the requested product

Return type:

Product

get_product_by_name(product_name, first_target='preview')[source]

Return the requested Product by its name from Legacy CPP API.

Parameters:
  • product_name (str) – The product name according to Legacy CPP API.

  • first_target (str, optional) – The first target to lookup into. Defaults to preview.

Returns:

the requested product when found

Return type:

Product

Raises:

NotFoundError when the product is not found.

get_product_plan_by_name(product_name, plan_name)[source]

Return a tuple with the desired Product and Plan after iterating over all targets.

Parameters:
  • product_name (str) – The name of the product to search for

  • plan_name (str) – The name of the plan to search for

Returns:

The Product and PlanSummary when fonud

Return type:

Tuple[Product, PlanSummary]

Raises:

NotFoundError whenever all targets are exhausted and no information was found

get_submission_state(product_id, state='preview')[source]

Retrieve a particular submission with the given state from the given Product id.

Parameters:
  • product_id (_type_) – The product id to request the submissions.

  • state (str, optional) – The state to filter the submission. Defaults to “preview”.

Returns:

The requested submission when found.

Return type:

Optional[ProductSubmission]

get_submissions(product_id)[source]

Return a list of submissions for the given Product id.

Parameters:

product_id (str) – The Product id to retrieve the submissions.

Returns:

List of all submissions for the given Product.

Return type:

List[ProductSubmission]

list_products()[source]

Return a list with the summary of products registerd in Azure.

Returns:

A list with ProductSummary for all products in Azure.

Return type:

list

property products: Iterator[ProductSummary]

Iterate over all products from Azure Marketplace.

publish(metadata)[source]

Associate a VM image with a given product listing (destination) and publish it if required.

Parameters:

metadata (AzurePublishingMetadata) – metadata for the VHD image publishing.

Return type:

None

submit_to_status(product_id, status)[source]

Send a submission request to Microsoft with a new Product status.

Parameters:
  • product_id (str) – The product ID to submit the new status.

  • status (str) – The new status: ‘preview’ or ‘live’

Return type:

ConfigureStatus

Returns:

The response from configure request.

Session

class cloudpub.ms_azure.session.PartnerPortalSession(auth_keys, prefix_url, mandatory_params=None, **kwargs)[source]

Implement the session for Azure API using the Active Directory credentials.

It’s expected to be instantiated through the factory method make_graph_api_session().

__init__(auth_keys, prefix_url, mandatory_params=None, **kwargs)[source]

Create a new PartnerPortalSession object.

Parameters:
  • auth_keys (dict) – Dictionary with the required secrets to login into a Microsoft API.

  • prefix_url (str) – The API prefix URL.

  • mandatory_params (dict, optional) – Mandatory parameters to pass for each API request, if any.

get(path, **kwargs)[source]

Execute an API GET request.

Return type:

Response

classmethod make_graph_api_session(auth_keys, schema_version='2022-03-01-preview3')[source]

Create a PartnerPortalSession for the Microsoft Graph API.

Parameters:
  • auth_keys (dict) – Dictionary with the required secrets to login into a Microsoft API.

  • api_version (str) – The schema version to use on each request. Defaults to 2022-03-01-preview3.

Raises:

ValueError on authentication failure.

Return type:

PartnerPortalSession

post(path, json, **kwargs)[source]

Execute an API POST request.

Return type:

Response

put(path, json, **kwargs)[source]

Execute an API PUT request.

Return type:

Response

class cloudpub.ms_azure.session.AccessToken(json)[source]

Represent the Microsoft API Authorization token.

__init__(json)[source]

Create a new AccessToken object.

Parameters:

json (dict) – The login response with from Microsoft.

is_expired()[source]

Return True if the token is expired and False otherwise.

Return type:

bool

Azure Models

The models used by AzureService.

The models are defined with attrs using the class AttrsJSONDecodeMixin to serialize/deserialize the JSON values for each request.

Note

These models implement the resources defined on Microsoft Product Ingestion API compatible with the version 2022-03-01-preview2.

Future updates in the API might require adjustments in these models or even the creation of new ones to be compatible with newer versions.

Contents:

Azure Product

class cloudpub.models.ms_azure.Product(schema, root_id, target, resources)[source]

Represent the entire product from resource-tree.

Schema definition

Attributes:

property id

Resolve the product ID from its durable ID.

property resource

Resource name from its durable ID.

resources: List[AzureResource]

The list of AzureResource associated with the product.

root_id: str

The resource durable ID.

schema: str

The top level product schema (root).

target: PublishTarget

The PublishTarget with product’s publishing state.

to_json()[source]

Convert a Product instance into a dictionary.

Returns:

The JSON from Product instance.

Return type:

dict

Product Resources

The following models are elements of Product’s resources.

class cloudpub.models.ms_azure.AzureResource(schema, durable_id)[source]

The base class for all Azure Resources.

Attributes:

durable_id: str

The resource durable ID.

property id

Resolve the resource ID from its durable ID.

property resource

Resource name from its durable ID.

schema: str

The resource schema for Graph API.

class cloudpub.models.ms_azure.AzureProductLinkedResource(schema, durable_id, product_durable_id)[source]

Represent a Resource linked to a product.

Attributes:

product_durable_id: str

The product durable ID.

property product_id

Resolve the product ID from its durable ID.

class cloudpub.models.ms_azure.AzurePlanLinkedResource(schema, durable_id, product_durable_id, plan_durable_id)[source]

Represent a resource linked to a plan.

Attributes:

  • durable_id() [inherited]

  • product_durable_id() [inherited]

  • schema() [inherited]

  • plan_durable_id()

plan_durable_id: str

The plan durable ID.

property plan_id

Resolve the plan ID from its durable ID.

class cloudpub.models.ms_azure.CustomerLeads(schema, durable_id, product_durable_id, destination, blob_lead_config, dynamic_lead_config, email_lead_config, https_endpoint_lead_config, marketo_lead_config, salesforce_lead_config, table_lead_config)[source]

Represent the customer leads section.

Schema definition for CustomerLeads

Attributes:

blob_lead_config: Optional[BlobLeadConfiguration]

The lead configuration for blob.

destination: str

The lead destination type for the product.

Expected value (one of):

  • none

  • blob

  • dynamics

  • email

  • httpsEndpoint

  • marketo

  • salesforce

  • table

dynamic_lead_config: Optional[DynamicsLeadConfiguration]

The lead configuration for dynamics.

email_lead_config: Optional[EmailLeadConfiguration]

The lead configuration for email.

https_endpoint_lead_config: Optional[HttpsEndpointLeadConfiguration]

The lead configuration for httpsEndpoint.

marketo_lead_config: Optional[MarketoLeadConfiguration]

The lead configuration for marketo.

salesforce_lead_config: Optional[SalesforceLeadConfiguration]

The lead configuration for salesforce.

table_lead_config: Optional[TableLeadConfiguration]

The lead configuration for table.

class cloudpub.models.ms_azure.Listing(schema, durable_id, product_durable_id, kind, title, description, search_summary, short_description, privacy_policy, general_links, cspmm, gov_support_site, global_support_site, support_contact, engineering_contact, cloud_solution_provider_contact, language, lifecycle_state)[source]

Represent a product listing.

Schema definition for Listing

Attributes:

cloud_solution_provider_contact: Optional[Contact]

The Contact for cloud provider support.

cspmm: str

The CSP marketing materials for the product.

description: str

Listing description to display in the Marketplace for customers.

engineering_contact: Contact

The Contact for engineering support.

General links for the product listing.

global_support_site: Optional[str]

The support web-site for product listing.

gov_support_site: Optional[str]

The support web-site for government product listing.

kind: str

Expected to be azure.

language: str

The language ID for the listing.

lifecycle_state: Optional[str]

The Listing lifecycle state.

Expected value (one of):

  • generallyAvailable

  • deleted

privacy_policy: str

The privacy policy link for the product.

search_summary: str

Summary to appear in the Marketplace search.

short_description: str

Short description to display in the Marketplace for customers.

support_contact: Contact

The Contact for customer support.

title: str

Listing title to display in the Marketplace for customers.

class cloudpub.models.ms_azure.ListingAsset(schema, durable_id, product_durable_id, kind, listing_durable_id, type, language, description, display_order, file_name, friendly_name, url, lifecycle_state)[source]

Represent an asset listing.

Schema definition for ListingAsset

Attributes:

description: str

The asset description.

display_order: int

An integer with minimum of 0.

file_name: str

The asset file name.

friendly_name: str

The asset alias.

kind: str

Expected to be azure.

language: str

Language ID for the asset.

lifecycle_state: Optional[str]

The Listing lifecycle state.

Expected value (one of):

  • generallyAvailable

  • deleted

listing_durable_id: str

The listing-asset durable ID.

property listing_id

Resolve the listing ID from its durable ID.

type: str

The type of asset.

Expected value (one of):

  • azureLogoSmall

  • azureLogoMedium

  • azureLogoLarge

  • azureLogoWide

  • azureLogoScreenshot

  • azureLogoHero

  • pdfDocument

url: str

The asset public URL.

class cloudpub.models.ms_azure.ListingTrailer(schema, durable_id, product_durable_id, kind, listing_durable_id, streaming_url, assets)[source]

Represent a video “trailer” asset for the given product.

Schema definition for ListingTrailer

Attributes:

assets: Dict[Literal['en-us'], VideoThumbnails]

Assets for the related video trailer.

At the moment only content in English is supported.

kind: str

Expected to be azure.

listing_durable_id: str

The listing-trailer durable ID.

property listing_id

Resolve the listing-trailer ID from its durable ID.

streaming_url: str

The URL for the video streaming.

E.g: https://www.youtube.com/watch?v=XXXXX

class cloudpub.models.ms_azure.PlanSummary(schema, durable_id, product_durable_id, identity, alias, regions, gov_certifications, display_rank, subtype, lifecycle_state, deprecation_schedule)[source]

Represent a plan summary.

Schema definition for PlanSummary

Attributes:

alias: str

The plan name to display in the Marketplace for customers.

deprecation_schedule: Optional[DeprecationSchedule]

The deprecation schedule for the plan if going to be deprecated.

gov_certifications: Optional[List[GovernmentCertification]]

Certifications for government plans.

identity: Identity

The Identity representing the planId from the legacy CPP API.

lifecycle_state: Optional[str]

The plan lifecycle state.

Expected value (one of):

  • generallyAvailable

  • deprecated

  • deleted

regions: List[str]

The regions where this plan is available.

Valid values (unique):

  • azureGlobal

  • azureGovernment

  • azureGermany

  • azureChina

subtype: str

Specifies the plan type (AzureApplication-type products only).

Expected value (one of):

  • managedApplication

  • solutionTemplate

For more details: https://go.microsoft.com/fwlink/?linkid=2106322

class cloudpub.models.ms_azure.PlanListing(schema, durable_id, product_durable_id, plan_durable_id, kind, name, description, summary, language, lifecycle_state)[source]

Represent a plan listing.

Schema definition for PlanListing

Attributes:

description: str

Description of the plan.

kind: str

Expected to be azureVM-plan.

language: str

Language ID for the plan.

lifecycle_state: Optional[str]

The Listing lifecycle state.

Expected value (one of):

  • generallyAvailable

  • deleted

name: str

Plan name to display in the marketplace.

summary: str

Summary of the plan.

class cloudpub.models.ms_azure.PriceAndAvailabilityOffer(schema, durable_id, product_durable_id, preview_audiences)[source]

Represent the price and availability of an offer.

Schema definition for PriceAndAvailabilityOffer

Attributes:

  • durable_id() [inherited]

  • product_durable_id() [inherited]

  • schema() [inherited]

  • preview_audiences()

preview_audiences: List[Audience]

The list of authorized Audience to preview the offer before publishing it to live.

class cloudpub.models.ms_azure.PriceAndAvailabilityPlan(schema, durable_id, product_durable_id, plan_durable_id, visibility, billing_tag, markets, pricing, trial, customer_markets, software_reservation, audience, private_audiences)[source]

Represent the price and availability of a plan.

Schema definition for PriceAndAvailabilityPlan

Attributes:

audience: str

It informs whether the plan is public or private.

Expected value (one of):

  • public

  • private

billing_tag: Optional[str]

The billing tag.

customer_markets: Optional[str]

The market type.

Expected value when set (one of):

  • customMarkets

  • allMarkets

  • allTaxRemittedMarkets

markets: List[str]

The countries which the plan is available.

It expects the lowercase country code (e.g.: us).

pricing: Pricing

The plan’s Pricing.

private_audiences: List[Audience]

The list of authorized Audience to consume the plan when it’s marked as private.

software_reservation: List[SoftwareReservation]

When set it allows a pricing discount for customers doing a reservation for one or three years.

trial: Optional[SoftwareTrial]

When set it allows customers to have a free trial during a certain period of time.

visibility: str

The the plan visibility on marketplace.

Expected value (one of):

  • visible

  • hidden

class cloudpub.models.ms_azure.ProductProperty(schema, durable_id, product_durable_id, kind, terms_of_use, terms_conditions, categories)[source]

Represent a product property.

Schema definition for ProductProperty

Attributes:

categories: Dict[str, List[str]]

The Azure categories for the product.

It supports the max of 2 categories.

kind: str

Expected to be azureVM

terms_conditions: Optional[str]

The product terms and conditions.

terms_of_use: Optional[str]

The product terms of use.

class cloudpub.models.ms_azure.ProductReseller(schema, durable_id, product_durable_id, reseller_channel_state, audiences)[source]

Represent a reseller offer resource.

Schema definition for ProductReseller

Attributes:

audiences: List[Audience]

List of Audience for the reseller offer.

reseller_channel_state: str

The reseller channel state.

Expected value (one of):

  • notSet

  • none

  • some

  • all

  • terminated

class cloudpub.models.ms_azure.ProductSubmission(durable_id, product_durable_id, schema, target, status, result, created, lifecycle_state, deprecation_schedule)[source]

Represent the product submission state.

Schema definition for ProductSubmission

Attributes:

created: Optional[str]

The creation date for the submission.

deprecation_schedule: Optional[DeprecationSchedule]

The deprecation schedule for the VM submission if it’s going to be deprecated.

lifecycle_state: Optional[str]

The product publishing lifecycle state.

Expected value (one of):

  • generallyAvailable

  • deprecated

result: Optional[str]

The submission result when status == completed.

Expected value when set (one of):

  • pending

  • succeeded

  • failed

schema: str

The resource schema for Graph API.

status: Optional[str]

The publishing status.

Expected value when set (one of):

  • notStarted

  • running

  • completed

target: PublishTarget

The product’s PublishTarget.

class cloudpub.models.ms_azure.ProductSummary(schema, durable_id, identity, type, alias, lifecycle_state, deprecation_schedule)[source]

Represent a product summary.

Schema definition for ProductSummary

Attributes:

alias: str

The product name to display in the Marketplace for customers.

deprecation_schedule: Optional[DeprecationSchedule]

The deprecation schedule for the product if going to be deprecated.

identity: Identity

The Identity representing the offerId from the legacy CPP API.

lifecycle_state: Optional[str]

The product lifecycle state.

Expected value (one of):

  • generallyAvailable

  • deprecated

  • deleted

type: str

The resource type.

Expected type (one of):

  • azureApplication

  • azureContainer

  • azureVirtualMachine

  • consultingService

  • containerApp

  • coreVirtualMachine

  • cosellOnly

  • dynamics365BusinessCentral

  • dynamics365ForCustomerEngagement

  • dynamics365ForOperations

  • iotEdgeModule

  • managedService

  • powerBiApp

  • powerBiVisual

  • softwareAsAService

  • xbox360NonBackcompat

class cloudpub.models.ms_azure.TestDrive(schema, durable_id, product_durable_id, enabled, type)[source]

Represent the test drive section.

Schema definition for TestDrive

Attributes:

  • durable_id() [inherited]

  • product_durable_id() [inherited]

  • schema() [inherited]

  • enabled()

  • type()

enabled: bool

Whether the TestDrive is enabled or not.

type: Optional[str]

The Test drive type, required only when enabled == True.

Expected value (one of):

  • azureResourceManager

  • dynamicsForBusinessCentral

  • dynamicsForCustomerEngagement

  • dynamicsForOperations

  • logicApp

  • powerBi

class cloudpub.models.ms_azure.VMIPlanTechConfig(durable_id, product_durable_id, plan_durable_id, schema, operating_system, recommended_vm_sizes, open_ports, vm_properties, skus, disk_versions, base_plan_durable_id)[source]

Represent the VM technical configuration of a Plan.

Schema definition for VMIPlanTechConfig

Attributes:

base_plan_durable_id: Optional[str]

The base plan durable ID when reusing.

property base_plan_id: str | None

Resolve the base plan ID from its durable ID.

disk_versions: List[DiskVersion]

The list of available DiskVersion in the plan.

open_ports: List[str]

The list of OS exposed ports when booting the VM.

operating_system: OSDetails

The plan’s OSDetails.

recommended_vm_sizes: List[str]

The list of recommended Azure Virtual Machine sizes for the OS.

The maximum lengh of this list is 6.

schema: str

The resource schema for Graph API.

skus: List[VMISku]

The list of available VMISku in the plan.

vm_properties: VMIProperties

The plan’s VMIProperties.

Resources internal elements

The following models are inner elements of some subclasses of AzureResource.

class cloudpub.models.ms_azure.Audience(type, id, label)[source]

Represent an audience.

Attributes:

id: str

The audience ID.

label: str

Optional label for the audience.

type: str

The audience type.

Expected value (one of):

  • none

  • subscription

  • ea

  • msdn

  • tenant

class cloudpub.models.ms_azure.BlobLeadConfiguration(contact_email, storage_connection_string, container_name)[source]

Define the blob lead configuration.

It’s part of CustomerLeads.

Attributes:

container_name: str

The storage container name.

storage_connection_string: str

The storage connection string.

It can be either the plain text connection string or a masked value.

class cloudpub.models.ms_azure.Contact(name, email, phone)[source]

Represent a single contact.

Attributes:

email: str

The contact e-mail.

name: str

The contact name.

phone: str

The contact phone.

class cloudpub.models.ms_azure.DataDisk[source]

Define a data disk.

It’s part of VMImageSource.

Schema definition for DataDisk

lun_number: int = _CountingAttr(counter=347, _default=NOTHING, repr=True, eq=True, order=True, hash=None, init=True, on_setattr=None, alias=None, metadata={'alias': 'lunNumber'})

The LUN number for the data disk (max = 15).

Attributes:

  • _default()

  • alias()

  • counter()

  • eq()

  • hash()

  • init()

  • metadata()

  • on_setattr()

  • order()

  • repr()

uri: str

The data disk URI.

class cloudpub.models.ms_azure.DeprecationAlternative(product_durable_id, plan_durable_id)[source]

Define an alternative product or plan for a deprecated one.

It’s part of DeprecationSchedule.

Attributes:

plan_durable_id: Optional[str]

The deprecated plan durable ID.

property plan_id: str | None

Resolve the plan ID from its durable ID.

product_durable_id: Optional[str]

The deprecated product durable ID.

property product_id: str | None

Resolve the product ID from its durable ID.

class cloudpub.models.ms_azure.DeprecationSchedule(schema, date, date_offset, reason, alternative)[source]

Represent a deprecation schedule.

It’s part of ProductSummary, PlanSummary and ProductSubmission.

Schema definition for DeprecationSchedule

Attributes:

alternative: Optional[DeprecationAlternative]

The alternative product or plan for the deprecated one.

date: str

The date for deprecation.

date_offset: Optional[str]

The date offset for deprecation.

reason: str

The deprecation reason.

Expected value (one of):

  • criticalSecurityIssue

  • endOfSupport

  • other

schema: Optional[str]

The resource schema for Graph API.

class cloudpub.models.ms_azure.DiskVersion(version_number, vm_images, lifecycle_state, deprecation_schedule)[source]

Represent a Disk Version.

Attributes:

deprecation_schedule: Optional[DeprecationSchedule]

The deprecation schedule for the VM image if it’s going to be deprecated.

lifecycle_state: Optional[str]

The disk lifeclycle state.

Expected value (one of):

  • generallyAvailable

  • deprecated

  • deleted

version_number: str

The Disk version number.

It expects a string with format {int}.{int}.{int}.

vm_images: List[VMImageDefinition]

The list of VMImageDefinition for this disk version.

class cloudpub.models.ms_azure.DynamicsLeadConfiguration(contact_email, instance_url, authentication, username, password, application_id, application_key, directory_id)[source]

Define the dynamics lead configuration.

It’s part of CustomerLeads.

Attributes:

application_id: Optional[str]

The dynamics application UUID.

application_key: Optional[str]

The dynamics application key.

authentication: str

The authentication type for dynamics.

Expected value (one of):

  • azureAD

  • office365

directory_id: Optional[str]

The dynamics directory UUID.

instance_url: str

The dynamics instance URL.

password: Optional[str]

The password for dynamics.

It can be either the plain text connection string or a masked value.

username: Optional[str]

The username for dynamics.

class cloudpub.models.ms_azure.Identity(name)[source]

Represent the resource identity (name).

Attributes:

name: str

The resource ID from the legacy CPP API.

class cloudpub.models.ms_azure.OSDetails(family, friendly_name, os_type)[source]

Represent an operating system details.

Attributes:

family: str

The operating system family.

It expects either linux or windows.

friendly_name: Optional[str]

The friendly name for the operating system.

os_type: str

The OS version or distribution name.

class cloudpub.models.ms_azure.OSDiskURI(uri)[source]

Represent an Operating System Disk URI.

Attributes:

uri: str

The full SAS URI for the Virtual Machine Image.

class cloudpub.models.ms_azure.EmailLeadConfiguration(contact_email)[source]

Define the e-mail lead configuration.

It’s part of CustomerLeads.

Attributes:

contact_email: List[str]

List of e-mails for the e-mail lead configuration.

class cloudpub.models.ms_azure.GovernmentCertification(name, link)[source]

Define a government certification.

It’s part of PlanSummary.

Attributes:

The URL for the certification web-page.

name: str

The certification name.

class cloudpub.models.ms_azure.HttpsEndpointLeadConfiguration(contact_email, endpoint_url)[source]

Define the https lead configuration.

It’s part of CustomerLeads.

Attributes:

endpoint_url: str

The HTTPS endpoint for the lead configuration.

class cloudpub.models.ms_azure.LeadConfiguration(contact_email)[source]

Define the common fields for all lead configuration models.

It’s part of CustomerLeads.

Attributes:

contact_email: Optional[List[str]]

List of e-mails for a lead configuration.

class cloudpub.models.ms_azure.MarketoLeadConfiguration(contact_email, server_id, munchkin_id, form_id)[source]

Define the marketo lead configuration.

It’s part of CustomerLeads.

Attributes:

form_id: str

The marketo form ID.

munchkin_id: str

The marketo munchkin ID.

server_id: str

The marketo server ID.

class cloudpub.models.ms_azure.Pricing(license_model, core_pricing)[source]

Represent the pricing.

Attributes:

core_pricing: CorePricing

The related CorePricing.

license_model: str

The license model for pricing.

Expected value (one of):

  • byol

  • payAsYouGo

class cloudpub.models.ms_azure.PublishTarget(targetType)[source]

Represent the publishing status of an AzureResource.

Attributes:

targetType: str

The publishing status.

Expected value (one of):

  • draft

  • preview

  • live

class cloudpub.models.ms_azure.SalesforceLeadConfiguration(contact_email, object_identifier)[source]

Define the salesforce lead configuration.

It’s part of CustomerLeads.

Attributes:

object_identifier: str

The salesforce object identifier.

class cloudpub.models.ms_azure.SoftwareReservation(type, term, percentage_save)[source]

Define the reservation prices for a plan.

It’s part of PriceAndAvailabilityPlan.

Schema definition for SoftwareReservation

Attributes:

percentage_save: int

The percentual of discount to be applied for the reservation.

term: int

The amount of months or years for reservation.

type: str

The reservation type.

Expected value (one of):

  • month

  • year

class cloudpub.models.ms_azure.SoftwareTrial(type, value)[source]

Represent the software free trial period definition.

It’s part of PriceAndAvailabilityPlan.

Schema definition for SoftwareTrial

Attributes:

type: str

The time type of trial.

Expected value (one of):

  • day

  • week

  • month

  • year

value: int

The amount of time for the trial.

class cloudpub.models.ms_azure.TableLeadConfiguration(contact_email, storage_connection_string)[source]

Define the table lead configuration.

It’s part of CustomerLeads.

Attributes:

storage_connection_string: str

The storage connection string.

It can be either the plain text connection string as well as a masked value.

class cloudpub.models.ms_azure.ThumbnailURL(url)[source]

Define a video thumbnail URL.

It’s part of VideoThumbnails.

Attributes:

url: str

URL of the thumbnail.

class cloudpub.models.ms_azure.VideoThumbnails(title, image_list)[source]

Define a group of thumbnails.

It’s part of ListingTrailer.

Attributes:

title: str

The thumbnail title.

class cloudpub.models.ms_azure.VMImageDefinition(image_type, source)[source]

Represent a Virtual Machine Image Definition.

Attributes:

image_type: str

The image type. Expects {arch}Gen1 or {arch}Gen2.

For more details of VHD Generation check the docs.

source: VMImageSource

The VMImageSource with the image.

class cloudpub.models.ms_azure.VMImageSource(source_type, os_disk, data_disks)[source]

Represent a Virtual Machine Image Source.

Attributes:

data_disks: List[DataDisk]

The list of data disks to mount within the OS.

os_disk: OSDiskURI

The OSDiskURI with the OS disk URI.

source_type: str

The virtual machine image source type.

Expected value (one of):

  • sasUri

  • sharedImageGallery

class cloudpub.models.ms_azure.VMIProperties(supportsExtensions=True, supportsBackup=False, supportsAcceleratedNetworking=False, isNetworkVirtualAppliance=False, networkVirtualAppliance=False, supportsNVMe=False, supportsCloudInit=False, supportsAadLogin=False, supportsHibernation=False, supportsRemoteConnection=True, requiresCustomArmTemplate=False, availableToFreeAccounts=False, supportsClientHub=False, supportsHubOnOffSwitch=False, supportsSriov=False)[source]

Represent the properties of a Virtual Machine Image.

Attributes:

availableToFreeAccounts: bool

Boolean indicating whether image is available for free accounts.

isNetworkVirtualAppliance: bool

Boolean indicating the network virtual appliance support. See the docs for more details.

networkVirtualAppliance: bool

Boolean indicating the network virtual appliance support for core machines.

requiresCustomArmTemplate: bool

Boolean indicating the image requires to use a custom ARM template for deployment. See the docs for more details.

supportsAadLogin: bool

Boolean indicating the AAD login support. See the docs for more details.

supportsAcceleratedNetworking: bool

Boolean indicating the accelerated network support. See the docs for more details.

supportsBackup: bool

Boolean indicating the backup support. See the docs for more details.

supportsClientHub: bool

Boolean indicating whether image supports the client hub.

supportsCloudInit: bool

Boolean indicating the cloud-init configuration support. See the docs for more details.

supportsExtensions: bool

Boolean indicating the extensions support. See the docs for more details.

supportsHibernation: bool

Boolean indicating the hibernation support. See the docs for more details.

supportsHubOnOffSwitch: bool

Boolean indicating whether image supports the on/off switch.

supportsNVMe: bool

Boolean indicating the NVMe support. See the docs for more details.

supportsRemoteConnection: bool

Boolean indicating the RDP/SSH support. See the docs for more details.

supportsSriov: bool

Boolean indicating whether image supports SR-IOV.

class cloudpub.models.ms_azure.VMISku(id, image_type, security_type=None)[source]

Represent the SKU for a Virtual Machine Image.

Attributes:

id: str

The SKU ID. Expects {plan_name} or {plan_name}-gen1.

image_type: str

The image type. Expects {arch}Gen2 or {arch}Gen1

security_type: Optional[List[str]]

trusted launch and/or confidential.

Type:

The security type for Gen2 images