:doc:`BedrockAgentCoreControl <../../bedrock-agentcore-control>` / Client / create_workload_identity

************************
create_workload_identity
************************



.. py:method:: BedrockAgentCoreControl.Client.create_workload_identity(**kwargs)

  

  Creates a new workload identity.

  

  See also: `AWS API Documentation <https://docs.aws.amazon.com/goto/WebAPI/bedrock-agentcore-control-2023-06-05/CreateWorkloadIdentity>`_  


  **Request Syntax**
  ::

    response = client.create_workload_identity(
        name='string',
        allowedResourceOauth2ReturnUrls=[
            'string',
        ],
        tags={
            'string': 'string'
        }
    )
    
  :type name: string
  :param name: **[REQUIRED]** 

    The name of the workload identity. The name must be unique within your account.

    

  
  :type allowedResourceOauth2ReturnUrls: list
  :param allowedResourceOauth2ReturnUrls: 

    The list of allowed OAuth2 return URLs for resources associated with this workload identity.

    

  
    - *(string) --* 

    

  :type tags: dict
  :param tags: 

    A map of tag keys and values to assign to the workload identity. Tags enable you to categorize your resources in different ways, for example, by purpose, owner, or environment.

    

  
    - *(string) --* 

    
      - *(string) --* 

      


  
  :rtype: dict
  :returns: 
    
    **Response Syntax**

    
    ::

      {
          'name': 'string',
          'workloadIdentityArn': 'string',
          'allowedResourceOauth2ReturnUrls': [
              'string',
          ]
      }
      
    **Response Structure**

    

    - *(dict) --* 
      

      - **name** *(string) --* 

        The name of the workload identity.

        
      

      - **workloadIdentityArn** *(string) --* 

        The Amazon Resource Name (ARN) of the workload identity.

        
      

      - **allowedResourceOauth2ReturnUrls** *(list) --* 

        The list of allowed OAuth2 return URLs for resources associated with this workload identity.

        
        

        - *(string) --* 
    
  
  **Exceptions**
  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.UnauthorizedException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ValidationException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.AccessDeniedException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ResourceNotFoundException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.ThrottlingException`

  
  *   :py:class:`BedrockAgentCoreControl.Client.exceptions.InternalServerException`

  