Skip to content

enable_aws_organizations_access

enable_aws_organizations_access(
    *, config_overrides: Optional[ServiceCatalogClientConfig] = None
) -> EnableAWSOrganizationsAccessOutput

Enable portfolio sharing feature through Organizations. This API will allow Service Catalog to receive updates on your organization in order to sync your shares with the current structure. This API can only be called by the management account in the organization.

When you call this API, Service Catalog calls organizations:EnableAWSServiceAccess on your behalf so that your shares stay in sync with any changes in your Organizations structure.

Note that a delegated administrator is not authorized to invoke EnableAWSOrganizationsAccess.

If you have previously disabled Organizations access for Service Catalog, and then enable access again, the portfolio access permissions might not sync with the latest changes to the organization structure. Specifically, accounts that you removed from the organization after disabling Service Catalog access, and before you enabled access again, can retain access to the previously shared portfolio. As a result, an account that has been removed from the organization might still be able to create or manage Amazon Web Services resources when it is no longer authorized to do so. Amazon Web Services is working to resolve this issue.

Raises:

Source code in docs_src/capo_service_catalog/_services/service_catalog.py
def enable_aws_organizations_access(
    self, *, config_overrides: Optional[ServiceCatalogClientConfig] = None
) -> "capo_service_catalog.types.enable_aws_organizations_access_output.EnableAWSOrganizationsAccessOutput":
    """<p>Enable portfolio sharing feature through Organizations. This API will allow Service Catalog to receive updates on your organization in order to sync your shares with the current structure. This API can only be called by the management account in the organization.</p> <p>When you call this API, Service Catalog calls <code>organizations:EnableAWSServiceAccess</code> on your behalf so that your shares stay in sync with any changes in your Organizations structure.</p> <p>Note that a delegated administrator is not authorized to invoke <code>EnableAWSOrganizationsAccess</code>.</p> <important> <p>If you have previously disabled Organizations access for Service Catalog, and then enable access again, the portfolio access permissions might not sync with the latest changes to the organization structure. Specifically, accounts that you removed from the organization after disabling Service Catalog access, and before you enabled access again, can retain access to the previously shared portfolio. As a result, an account that has been removed from the organization might still be able to create or manage Amazon Web Services resources when it is no longer authorized to do so. Amazon Web Services is working to resolve this issue.</p> </important>

    Raises:
        capo_service_catalog.errors.invalid_state_exception.InvalidStateException: <p>An attempt was made to modify a resource that is in a state that is not valid. Check your resources to ensure that they are in valid states before retrying the operation.</p>
        capo_service_catalog.errors.operation_not_supported_exception.OperationNotSupportedException: <p>The operation is not supported.</p>
        capo_service_catalog.errors.resource_not_found_exception.ResourceNotFoundException: <p>The specified resource was not found.</p>
        capo_service_catalog.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    def _handler(
        req: "OperationRequest[capo_service_catalog.types.enable_aws_organizations_access_input.EnableAWSOrganizationsAccessInput]",
    ) -> OperationResponse[
        "capo_service_catalog.types.enable_aws_organizations_access_output.EnableAWSOrganizationsAccessOutput"
    ]:
        import capo_service_catalog._operations.aws242_service_catalog_service.enable_aws_organizations_access

        output, http_response = (
            capo_service_catalog._operations.aws242_service_catalog_service.enable_aws_organizations_access.enable_aws_organizations_access(
                req.options, req.input
            )
        )
        return OperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("EnableAWSOrganizationsAccess")
    )
    input_: capo_service_catalog.types.enable_aws_organizations_access_input.EnableAWSOrganizationsAccessInput = {}

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