Associates an application to entitle.
Parameters:
-
stack_name
(Optional[Name], default:
None
)
–
-
entitlement_name
(Optional[Name], default:
None
)
–
The name of the entitlement.
-
application_identifier
(Optional[String], default:
None
)
–
The identifier of the application.
Raises:
Source code in docs_src/capo_appstream/_services/app_stream.py
| def associate_application_to_entitlement(
self,
*,
config_overrides: Optional[AppStreamClientConfig] = None,
stack_name: Optional["capo_appstream.types.name.Name"] = None,
entitlement_name: Optional["capo_appstream.types.name.Name"] = None,
application_identifier: Optional["capo_appstream.types.string.String"] = None,
) -> "capo_appstream.types.associate_application_to_entitlement_result.AssociateApplicationToEntitlementResult":
"""<p>Associates an application to entitle.</p>
Args:
stack_name: <p>The name of the stack.</p>
entitlement_name: <p>The name of the entitlement.</p>
application_identifier: <p>The identifier of the application.</p>
Raises:
capo_appstream.errors.entitlement_not_found_exception.EntitlementNotFoundException: <p>The entitlement can't be found.</p>
capo_appstream.errors.limit_exceeded_exception.LimitExceededException: <p>The requested limit exceeds the permitted limit for an account.</p>
capo_appstream.errors.operation_not_permitted_exception.OperationNotPermittedException: <p>The attempted operation is not permitted.</p>
capo_appstream.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
capo_appstream.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_appstream.types.associate_application_to_entitlement_request.AssociateApplicationToEntitlementRequest]",
) -> OperationResponse[
"capo_appstream.types.associate_application_to_entitlement_result.AssociateApplicationToEntitlementResult"
]:
import capo_appstream._operations.photon_admin_proxy_service.associate_application_to_entitlement
output, http_response = (
capo_appstream._operations.photon_admin_proxy_service.associate_application_to_entitlement.associate_application_to_entitlement(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
interceptors_, options_ = self.operation_options(
config_overrides, OperationLogging("AssociateApplicationToEntitlement")
)
input_: capo_appstream.types.associate_application_to_entitlement_request.AssociateApplicationToEntitlementRequest = {}
if stack_name is not None:
input_["stack_name"] = stack_name
if entitlement_name is not None:
input_["entitlement_name"] = entitlement_name
if application_identifier is not None:
input_["application_identifier"] = application_identifier
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output
|