CertificateOperations Class

CertificateOperations operations.

You should not instantiate directly this class, but create a Client instance that will create it for you and attach it as attribute.

Inheritance
builtins.object
CertificateOperations

Constructor

CertificateOperations(client, config, serializer, deserializer)

Parameters

client
Required

Client for service requests.

config
Required

Configuration of service client.

serializer
Required

An object model serializer.

deserializer
Required

An object model deserializer.

Variables

api_version

The API version to use for the request. Constant value: "2022-01-01.15.0".

Methods

add

Adds a Certificate to the specified Account.

cancel_deletion

Cancels a failed deletion of a Certificate from the specified Account.

If you try to delete a Certificate that is being used by a Pool or Compute Node, the status of the Certificate changes to deleteFailed. If you decide that you want to continue using the Certificate, you can use this operation to set the status of the Certificate back to active. If you intend to delete the Certificate, you do not need to run this operation after the deletion failed. You must make sure that the Certificate is not being used by any resources, and then you can try again to delete the Certificate.

delete

Deletes a Certificate from the specified Account.

You cannot delete a Certificate if a resource (Pool or Compute Node) is using it. Before you can delete a Certificate, you must therefore make sure that the Certificate is not associated with any existing Pools, the Certificate is not installed on any Nodes (even if you remove a Certificate from a Pool, it is not removed from existing Compute Nodes in that Pool until they restart), and no running Tasks depend on the Certificate. If you try to delete a Certificate that is in use, the deletion fails. The Certificate status changes to deleteFailed. You can use Cancel Delete Certificate to set the status back to active if you decide that you want to continue using the Certificate.

get

Gets information about the specified Certificate.

list

Lists all of the Certificates that have been added to the specified Account.

add

Adds a Certificate to the specified Account.

add(certificate, certificate_add_options=None, custom_headers=None, raw=False, **operation_config)

Parameters

certificate
CertificateAddParameter
Required

The Certificate to be added.

certificate_add_options
CertificateAddOptions
default value: None

Additional parameters for the operation

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

cancel_deletion

Cancels a failed deletion of a Certificate from the specified Account.

If you try to delete a Certificate that is being used by a Pool or Compute Node, the status of the Certificate changes to deleteFailed. If you decide that you want to continue using the Certificate, you can use this operation to set the status of the Certificate back to active. If you intend to delete the Certificate, you do not need to run this operation after the deletion failed. You must make sure that the Certificate is not being used by any resources, and then you can try again to delete the Certificate.

cancel_deletion(thumbprint_algorithm, thumbprint, certificate_cancel_deletion_options=None, custom_headers=None, raw=False, **operation_config)

Parameters

thumbprint_algorithm
str
Required

The algorithm used to derive the thumbprint parameter. This must be sha1.

thumbprint
str
Required

The thumbprint of the Certificate being deleted.

certificate_cancel_deletion_options
CertificateCancelDeletionOptions
default value: None

Additional parameters for the operation

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

delete

Deletes a Certificate from the specified Account.

You cannot delete a Certificate if a resource (Pool or Compute Node) is using it. Before you can delete a Certificate, you must therefore make sure that the Certificate is not associated with any existing Pools, the Certificate is not installed on any Nodes (even if you remove a Certificate from a Pool, it is not removed from existing Compute Nodes in that Pool until they restart), and no running Tasks depend on the Certificate. If you try to delete a Certificate that is in use, the deletion fails. The Certificate status changes to deleteFailed. You can use Cancel Delete Certificate to set the status back to active if you decide that you want to continue using the Certificate.

delete(thumbprint_algorithm, thumbprint, certificate_delete_options=None, custom_headers=None, raw=False, **operation_config)

Parameters

thumbprint_algorithm
str
Required

The algorithm used to derive the thumbprint parameter. This must be sha1.

thumbprint
str
Required

The thumbprint of the Certificate to be deleted.

certificate_delete_options
CertificateDeleteOptions
default value: None

Additional parameters for the operation

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

None or ClientRawResponse if raw=true

Return type

None,

Exceptions

get

Gets information about the specified Certificate.

get(thumbprint_algorithm, thumbprint, certificate_get_options=None, custom_headers=None, raw=False, **operation_config)

Parameters

thumbprint_algorithm
str
Required

The algorithm used to derive the thumbprint parameter. This must be sha1.

thumbprint
str
Required

The thumbprint of the Certificate to get.

certificate_get_options
CertificateGetOptions
default value: None

Additional parameters for the operation

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

Certificate or ClientRawResponse if raw=true

Return type

Exceptions

list

Lists all of the Certificates that have been added to the specified Account.

list(certificate_list_options=None, custom_headers=None, raw=False, **operation_config)

Parameters

certificate_list_options
CertificateListOptions
default value: None

Additional parameters for the operation

custom_headers
dict
default value: None

headers that will be added to the request

raw
bool
default value: False

returns the direct response alongside the deserialized response

operation_config
Required

Operation configuration overrides.

Returns

An iterator like instance of Certificate

Return type

Exceptions

Attributes

models

models = <module 'azure.batch.models' from 'C:\\hostedtoolcache\\windows\\Python\\3.9.13\\x64\\lib\\site-packages\\azure\\batch\\models\\__init__.py'>