Amazon AWS

class AmazonAWS(api)

Bases: _ApplicationBase

create(name, device, aws_credential, description=None, contacts=None, approvers=None, issued_by_aws=None, provision_to=None, region=None, iam_install_path=None, replace_existing=None, binding_target=None, load_balancer_name=None, load_balancer_port=None, target_group=None, create_listener=None, cloudfront_distribution_id=None, attributes=None, get_if_already_exists=True)
Parameters:
  • name (str) – Name of the application object.

  • device (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the device object.

  • aws_credential (Union[config.Object, str]) – Config Object or Distinguished Name (DN) of the AWS credential object.

  • description (str) – Description for the application object.

  • contacts (list[Union[ident.Identity, str]]) – List of Identity Object or Prefixed Name as contacts for the application object.

  • approvers (list[Union[ident.Identity, str]]) – List of Identity Object or Prefixed Name as approvers for the application object.

  • issued_by_aws (bool) – The certificate should be issued by AWS Certificate Manager.

  • provision_to (int) – ACM or IAM.

  • region (str) – AWS region.

  • iam_install_path (str) – IAM path for certificate upload.

  • replace_existing (bool) – Replace the existing store.

  • binding_target (Union[str, int]) – Binding target.

  • load_balancer_name (str) – Name of the load balancer.

  • load_balancer_port (int) – Port of the load balancer.

  • target_group (str) – Default target group.

  • create_listener (bool) – Create listener.

  • cloudfront_distribution_id (str) – CloudFront Distribution ID.

  • attributes (dict) – Additional attributes pertaining to the application object.

  • get_if_already_exists (bool) – If the objects already exists, just return it as is.

Returns:

Config Object of the application.

delete(application)

Deletes an application object.

Parameters:

application (Object | str) – Config Object or Distinguished Name (DN) of the application object.

disable(application)

Disables all processing and provisioning of the application.

Parameters:

application (Object | str) – Config Object or Distinguished Name (DN) of the application object.

enable(application)

Enables all processing and provisioning of the application.

Parameters:

application (Object | str) – Config Object or Distinguished Name (DN) of the application object.

get(application_dn, raise_error_if_not_exists=True)
Parameters:
Returns:

Config Object of the application

get_associated_certificate(application)
Parameters:

application (Object | str) – Config Object or Distinguished Name (DN) of the application object.

Returns:

Config Object of the certificate object associated to the application object.

get_stage(application)
Parameters:

application (Object | str) – Config Object or Distinguished Name (DN) of the application object.

Returns:

The current stage if it exists. Otherwise, returns None.

Return type:

int

get_status(application)
Parameters:

application (Object | str) – Config Object or Distinguished Name (DN) of the application object.

Returns:

The current processing status of the application object or None if a status does not exist.

Return type:

str

wait_for_installation_to_complete(application, timeout=60)

Waits for the application object’s “Last Pushed On” attribute to be a date greater than or equal to the “Last Renewed On” date on the associated certificate. If the certificate has not been recently renewed and is simply being associated to the certificate, either clear the “Last Pushed On” date from the application object or use pyvenafi.tpp.features.certificate.Certificate.associate_application() with push_to_new=True.

Parameters: