🚨
This commit is contained in:
parent
498419462d
commit
d98e96ddd7
@ -625,14 +625,6 @@ class IoTBackend(BaseBackend):
|
|||||||
pass
|
pass
|
||||||
raise ResourceNotFoundException()
|
raise ResourceNotFoundException()
|
||||||
|
|
||||||
def attach_policy(self, policy_name, target):
|
|
||||||
principal = self._get_principal(target)
|
|
||||||
policy = self.get_policy(policy_name)
|
|
||||||
k = (target, policy_name)
|
|
||||||
if k in self.principal_policies:
|
|
||||||
return
|
|
||||||
self.principal_policies[k] = (principal, policy)
|
|
||||||
|
|
||||||
def attach_principal_policy(self, policy_name, principal_arn):
|
def attach_principal_policy(self, policy_name, principal_arn):
|
||||||
principal = self._get_principal(principal_arn)
|
principal = self._get_principal(principal_arn)
|
||||||
policy = self.get_policy(policy_name)
|
policy = self.get_policy(policy_name)
|
||||||
@ -641,15 +633,6 @@ class IoTBackend(BaseBackend):
|
|||||||
return
|
return
|
||||||
self.principal_policies[k] = (principal, policy)
|
self.principal_policies[k] = (principal, policy)
|
||||||
|
|
||||||
def detach_policy(self, policy_name, target):
|
|
||||||
# this may raises ResourceNotFoundException
|
|
||||||
self._get_principal(target)
|
|
||||||
self.get_policy(policy_name)
|
|
||||||
k = (target, policy_name)
|
|
||||||
if k not in self.principal_policies:
|
|
||||||
raise ResourceNotFoundException()
|
|
||||||
del self.principal_policies[k]
|
|
||||||
|
|
||||||
def detach_principal_policy(self, policy_name, principal_arn):
|
def detach_principal_policy(self, policy_name, principal_arn):
|
||||||
# this may raises ResourceNotFoundException
|
# this may raises ResourceNotFoundException
|
||||||
self._get_principal(principal_arn)
|
self._get_principal(principal_arn)
|
||||||
|
@ -121,7 +121,8 @@ class IoTResponse(BaseResponse):
|
|||||||
description=self._get_param("description"),
|
description=self._get_param("description"),
|
||||||
document_source=self._get_param("documentSource"),
|
document_source=self._get_param("documentSource"),
|
||||||
document=self._get_param("document"),
|
document=self._get_param("document"),
|
||||||
presigned_url_config=self._get_param("presignedUrlConfig"), target_selection=self._get_param("targetSelection"),
|
presigned_url_config=self._get_param("presignedUrlConfig"),
|
||||||
|
target_selection=self._get_param("targetSelection"),
|
||||||
job_executions_rollout_config=self._get_param("jobExecutionsRolloutConfig"),
|
job_executions_rollout_config=self._get_param("jobExecutionsRolloutConfig"),
|
||||||
document_parameters=self._get_param("documentParameters")
|
document_parameters=self._get_param("documentParameters")
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user