Skip to content

create_custom_permissions async

create_custom_permissions(
    aws_account_id: AwsAccountId,
    custom_permissions_name: CustomPermissionsName,
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    capabilities: Optional[Capabilities] = None,
    governance: Optional[Governance] = None,
    tags: Optional[TagList] = None,
) -> CreateCustomPermissionsResponse

Creates a custom permissions profile.

Parameters:

  • aws_account_id (AwsAccountId) –

    The ID of the Amazon Web Services account that you want to create the custom permissions profile in.

  • custom_permissions_name (CustomPermissionsName) –

    The name of the custom permissions profile that you want to create.

  • capabilities (Optional[Capabilities], default: None ) –

    A set of actions to include in the custom permissions profile.

  • governance (Optional[Governance], default: None ) –

    The governance configuration for the custom permissions profile. When governance controls are defined for a category, any capabilities in that category not explicitly set to ALLOW in Capabilities are denied. Even newly added capabilities in the category are implicitly disabled when Amazon Quick releases them.

  • tags (Optional[TagList], default: None ) –

    The tags to associate with the custom permissions profile.

Raises:

Source code in docs_src/capo_quicksight/_services/async_quick_sight.py
async def create_custom_permissions(
    self,
    aws_account_id: "capo_quicksight.types.aws_account_id.AwsAccountId",
    custom_permissions_name: "capo_quicksight.types.custom_permissions_name.CustomPermissionsName",
    *,
    config_overrides: Optional[AsyncQuickSightClientConfig] = None,
    capabilities: Optional[
        "capo_quicksight.types.capabilities.Capabilities"
    ] = None,
    governance: Optional["capo_quicksight.types.governance.Governance"] = None,
    tags: Optional["capo_quicksight.types.tag_list.TagList"] = None,
) -> "capo_quicksight.types.create_custom_permissions_response.CreateCustomPermissionsResponse":
    """<p>Creates a custom permissions profile.</p>

    Args:
        aws_account_id: <p>The ID of the Amazon Web Services account that you want to create the custom permissions profile in.</p>
        custom_permissions_name: <p>The name of the custom permissions profile that you want to create.</p>
        capabilities: <p>A set of actions to include in the custom permissions profile.</p>
        governance: <p>The governance configuration for the custom permissions profile. When governance controls are defined for a category, any capabilities in that category not explicitly set to <code>ALLOW</code> in <code>Capabilities</code> are denied. Even newly added capabilities in the category are implicitly disabled when Amazon Quick releases them.</p>
        tags: <p>The tags to associate with the custom permissions profile.</p>

    Raises:
        capo_quicksight.errors.access_denied_exception.AccessDeniedException: <p>You don't have access to this item. The provided credentials couldn't be validated. You might not be authorized to carry out the request. Make sure that your account is authorized to use the Amazon Quick Sight service, that your policies have the correct permissions, and that you are using the correct credentials.</p>
        capo_quicksight.errors.conflict_exception.ConflictException: <p>Updating or deleting a resource can cause an inconsistent state.</p>
        capo_quicksight.errors.internal_failure_exception.InternalFailureException: <p>An internal failure occurred.</p>
        capo_quicksight.errors.invalid_parameter_value_exception.InvalidParameterValueException: <p>One or more parameters has a value that isn't valid.</p>
        capo_quicksight.errors.limit_exceeded_exception.LimitExceededException: <p>A limit is exceeded.</p>
        capo_quicksight.errors.precondition_not_met_exception.PreconditionNotMetException: <p>One or more preconditions aren't met.</p>
        capo_quicksight.errors.resource_exists_exception.ResourceExistsException: <p>The resource specified already exists. </p>
        capo_quicksight.errors.resource_not_found_exception.ResourceNotFoundException: <p>One or more resources can't be found.</p>
        capo_quicksight.errors.resource_unavailable_exception.ResourceUnavailableException: <p>This resource is currently unavailable.</p>
        capo_quicksight.errors.throttling_exception.ThrottlingException: <p>Access is throttled.</p>
        capo_quicksight.errors.UnknownServiceError: The service returned an error code this client does not model.
    """

    async def _handler(
        req: "AsyncOperationRequest[capo_quicksight.types.create_custom_permissions_request.CreateCustomPermissionsRequest]",
    ) -> AsyncOperationResponse[
        "capo_quicksight.types.create_custom_permissions_response.CreateCustomPermissionsResponse"
    ]:
        import capo_quicksight._operations.quick_sight_20180401.create_custom_permissions

        (
            output,
            http_response,
        ) = await capo_quicksight._operations.quick_sight_20180401.create_custom_permissions.async_create_custom_permissions(
            req.options, req.input
        )
        return AsyncOperationResponse(output=output, response=http_response)

    interceptors_, options_ = self.operation_options(
        config_overrides, OperationLogging("CreateCustomPermissions")
    )
    input_: capo_quicksight.types.create_custom_permissions_request.CreateCustomPermissionsRequest = {
        "aws_account_id": aws_account_id,
        "custom_permissions_name": custom_permissions_name,
    }
    if capabilities is not None:
        input_["capabilities"] = capabilities
    if governance is not None:
        input_["governance"] = governance
    if tags is not None:
        input_["tags"] = tags

    response = await aexecute_pipeline(
        AsyncOperationRequest(input=input_, options=options_),
        handler=_handler,
        interceptors=list(interceptors_),
    )
    await response.response.aclose()
    return response.output