Skip to content

list_vm_entitlements

list_vm_entitlements(
    environment_id: EnvironmentId,
    connector_id: ConnectorId,
    entitlement_type: EntitlementType,
    *,
    config_overrides: Optional[evsClientConfig] = None,
    next_token: Optional[PaginationToken] = None,
    max_results: Optional[MaxResults] = None,
) -> ListVmEntitlementsResponse

Lists the Windows Server License entitlements for virtual machines in an Amazon EVS environment. Returns existing entitlements for virtual machines associated with the specified environment and connector.

Parameters:

  • next_token (Optional[PaginationToken], default: None ) –

    A unique pagination token for each page. If nextToken is returned, there are more results available. Make the call again using the returned token with all other arguments unchanged to retrieve the next page. Each pagination token expires after 24 hours. Using an expired pagination token will return an HTTP 400 InvalidToken error.

  • max_results (Optional[MaxResults], default: None ) –

    The maximum number of results to return. If you specify MaxResults in the request, the response includes information up to the limit specified.

  • environment_id (EnvironmentId) –

    A unique ID for the environment.

  • connector_id (ConnectorId) –

    A unique ID for the connector.

  • entitlement_type (EntitlementType) –

    The type of entitlement to list.

Raises:

  • ResourceNotFoundException –

    A service resource associated with the request could not be found. The resource might not be specified correctly, or it may have a state of DELETED.

  • ValidationException –

    The input fails to satisfy the specified constraints. You will see this exception if invalid inputs are provided for any of the Amazon EVS environment operations, or if a list operation is performed on an environment resource that is still initializing.

  • UnknownServiceError –

    The service returned an error code this client does not model.

Source code in docs_src/capo_evs/_services/evs.py
def list_vm_entitlements(
    self,
    environment_id: "capo_evs.types.environment_id.EnvironmentId",
    connector_id: "capo_evs.types.connector_id.ConnectorId",
    entitlement_type: "capo_evs.types.entitlement_type.EntitlementType",
    *,
    config_overrides: Optional[evsClientConfig] = None,
    next_token: Optional["capo_evs.types.pagination_token.PaginationToken"] = None,
    max_results: Optional["capo_evs.types.max_results.MaxResults"] = None,
) -> "capo_evs.types.list_vm_entitlements_response.ListVmEntitlementsResponse":
    """<p>Lists the Windows Server License entitlements for virtual machines in an Amazon EVS environment. Returns existing entitlements for virtual machines associated with the specified environment and connector.</p>

    Args:
        next_token: <p>A unique pagination token for each page. If <code>nextToken</code> is returned, there are more results available. Make the call again using the returned token with all other arguments unchanged to retrieve the next page. Each pagination token expires after 24 hours. Using an expired pagination token will return an <i>HTTP 400 InvalidToken</i> error.</p>
        max_results: <p>The maximum number of results to return. If you specify <code>MaxResults</code> in the request, the response includes information up to the limit specified.</p>
        environment_id: <p>A unique ID for the environment.</p>
        connector_id: <p>A unique ID for the connector.</p>
        entitlement_type: <p>The type of entitlement to list.</p>

    Raises:
        capo_evs.errors.resource_not_found_exception.ResourceNotFoundException: <p>A service resource associated with the request could not be found. The resource might not be specified correctly, or it may have a <code>state</code> of <code>DELETED</code>.</p>
        capo_evs.errors.validation_exception.ValidationException: <p>The input fails to satisfy the specified constraints. You will see this exception if invalid inputs are provided for any of the Amazon EVS environment operations, or if a list operation is performed on an environment resource that is still initializing.</p>
        capo_evs.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_evs.types.list_vm_entitlements_request.ListVmEntitlementsRequest]",
    ) -> OperationResponse[
        "capo_evs.types.list_vm_entitlements_response.ListVmEntitlementsResponse"
    ]:
        import capo_evs._operations.amazon_elastic_v_mware_service.list_vm_entitlements

        output, http_response = (
            capo_evs._operations.amazon_elastic_v_mware_service.list_vm_entitlements.list_vm_entitlements(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("ListVmEntitlements")
    )
    input_: capo_evs.types.list_vm_entitlements_request.ListVmEntitlementsRequest = {
        "environment_id": environment_id,
        "connector_id": connector_id,
        "entitlement_type": entitlement_type,
    }
    if next_token is not None:
        input_["next_token"] = next_token
    if max_results is not None:
        input_["max_results"] = max_results

    response = execute_pipeline(
        OperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    response.response.close()
    return response.output