def set_identity_pool_roles(IdentityPoolId, AuthenticatedRole=None, UnauthenticatedRole=None, region=None, key=None, keyid=None, profile=None):
 conn_params = dict(region=region, key=key, keyid=keyid, profile=profile)
 conn = _get_conn(**conn_params)
 try:
  if AuthenticatedRole:
   role_arn = _get_role_arn(AuthenticatedRole, **conn_params)
   if (role_arn is None):
    return {'set': False, 'error': 'invalid AuthenticatedRole {0}'.format(AuthenticatedRole)}
   AuthenticatedRole = role_arn
  if UnauthenticatedRole:
   role_arn = _get_role_arn(UnauthenticatedRole, **conn_params)
   if (role_arn is None):
    return {'set': False, 'error': 'invalid UnauthenticatedRole {0}'.format(UnauthenticatedRole)}
   UnauthenticatedRole = role_arn
  Roles = dict()
  if AuthenticatedRole:
   Roles['authenticated'] = AuthenticatedRole
  if UnauthenticatedRole:
   Roles['unauthenticated'] = UnauthenticatedRole
  conn.set_identity_pool_roles(IdentityPoolId=IdentityPoolId, Roles=Roles)
  return {'set': True, 'roles': Roles}
 except ClientError as e:
  return {'set': False, 'error': salt.utils.boto3.get_error(e)}

def set_identity_pool_roles ( IdentityPoolId , AuthenticatedRole = None , UnauthenticatedRole = None , region = None , key = None , keyid = None , profile = None ) : conn_params = dict ( region = region , key = key , keyid = keyid , profile = profile ) conn = _get_conn ( ** conn_params ) try : if AuthenticatedRole : role_arn = _get_role_arn ( AuthenticatedRole , ** conn_params ) if ( role_arn is None ) : return { 'set' : False , 'error' : 'invalid AuthenticatedRole {0}' . format ( AuthenticatedRole ) } AuthenticatedRole = role_arn if UnauthenticatedRole : role_arn = _get_role_arn ( UnauthenticatedRole , ** conn_params ) if ( role_arn is None ) : return { 'set' : False , 'error' : 'invalid UnauthenticatedRole {0}' . format ( UnauthenticatedRole ) } UnauthenticatedRole = role_arn Roles = dict ( ) if AuthenticatedRole : Roles [ 'authenticated' ] = AuthenticatedRole if UnauthenticatedRole : Roles [ 'unauthenticated' ] = UnauthenticatedRole conn . set_identity_pool_roles ( IdentityPoolId = IdentityPoolId , Roles = Roles ) return { 'set' : True , 'roles' : Roles } except ClientError as e : return { 'set' : False , 'error' : salt . utils . boto3 . get_error ( e ) }
given an identity pool id .