Skip to content

Commit

Permalink
Update Greengrass IPC
Browse files Browse the repository at this point in the history
  • Loading branch information
sfodagain committed Jul 10, 2024
1 parent 6b063b5 commit 1463504
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
12 changes: 8 additions & 4 deletions awsiot/greengrasscoreipc/clientv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,30 +405,34 @@ def get_local_deployment_status_async(self, *,
def get_secret_value(self, *,
secret_id: typing.Optional[str] = None,
version_id: typing.Optional[str] = None,
version_stage: typing.Optional[str] = None) -> model.GetSecretValueResponse:
version_stage: typing.Optional[str] = None,
refresh: typing.Optional[bool] = None) -> model.GetSecretValueResponse:
"""
Perform the GetSecretValue operation synchronously.
Args:
secret_id:
version_id:
version_stage:
refresh:
"""
return self.get_secret_value_async(secret_id=secret_id, version_id=version_id, version_stage=version_stage).result()
return self.get_secret_value_async(secret_id=secret_id, version_id=version_id, version_stage=version_stage, refresh=refresh).result()

def get_secret_value_async(self, *,
secret_id: typing.Optional[str] = None,
version_id: typing.Optional[str] = None,
version_stage: typing.Optional[str] = None): # type: (...) -> concurrent.futures.Future[model.GetSecretValueResponse]
version_stage: typing.Optional[str] = None,
refresh: typing.Optional[bool] = None): # type: (...) -> concurrent.futures.Future[model.GetSecretValueResponse]
"""
Perform the GetSecretValue operation asynchronously.
Args:
secret_id:
version_id:
version_stage:
refresh:
"""
request = model.GetSecretValueRequest(secret_id=secret_id, version_id=version_id, version_stage=version_stage)
request = model.GetSecretValueRequest(secret_id=secret_id, version_id=version_id, version_stage=version_stage, refresh=refresh)
operation = self.client.new_get_secret_value()
write_future = operation.activate(request)
return self.__combine_futures(write_future, operation.get_response())
Expand Down
14 changes: 13 additions & 1 deletion awsiot/greengrasscoreipc/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -3636,21 +3636,25 @@ class GetSecretValueRequest(rpc.Shape):
secret_id: The name of the secret to get. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
version_id: (Optional) The ID of the version to get. If you don't specify versionId or versionStage, this operation defaults to the version with the AWSCURRENT label.
version_stage: (Optional) The staging label of the version to get. If you don't specify versionId or versionStage, this operation defaults to the version with the AWSCURRENT label.
refresh: (Optional) Whether to fetch the latest secret from cloud when the request is handled. Defaults to false.
Attributes:
secret_id: The name of the secret to get. You can specify either the Amazon Resource Name (ARN) or the friendly name of the secret.
version_id: (Optional) The ID of the version to get. If you don't specify versionId or versionStage, this operation defaults to the version with the AWSCURRENT label.
version_stage: (Optional) The staging label of the version to get. If you don't specify versionId or versionStage, this operation defaults to the version with the AWSCURRENT label.
refresh: (Optional) Whether to fetch the latest secret from cloud when the request is handled. Defaults to false.
"""

def __init__(self, *,
secret_id: typing.Optional[str] = None,
version_id: typing.Optional[str] = None,
version_stage: typing.Optional[str] = None):
version_stage: typing.Optional[str] = None,
refresh: typing.Optional[bool] = None):
super().__init__()
self.secret_id = secret_id # type: typing.Optional[str]
self.version_id = version_id # type: typing.Optional[str]
self.version_stage = version_stage # type: typing.Optional[str]
self.refresh = refresh # type: typing.Optional[bool]

def set_secret_id(self, secret_id: str):
self.secret_id = secret_id
Expand All @@ -3664,6 +3668,10 @@ def set_version_stage(self, version_stage: str):
self.version_stage = version_stage
return self

def set_refresh(self, refresh: bool):
self.refresh = refresh
return self


def _to_payload(self):
payload = {}
Expand All @@ -3673,6 +3681,8 @@ def _to_payload(self):
payload['versionId'] = self.version_id
if self.version_stage is not None:
payload['versionStage'] = self.version_stage
if self.refresh is not None:
payload['refresh'] = self.refresh
return payload

@classmethod
Expand All @@ -3684,6 +3694,8 @@ def _from_payload(cls, payload):
new.version_id = payload['versionId']
if 'versionStage' in payload:
new.version_stage = payload['versionStage']
if 'refresh' in payload:
new.refresh = payload['refresh']
return new

@classmethod
Expand Down

0 comments on commit 1463504

Please sign in to comment.