def set_smb_guest_password(
self,
gateway_arn: "capo_storage_gateway.types.gateway_arn.GatewayARN",
password: "capo_storage_gateway.types.smb_guest_password.SMBGuestPassword",
*,
config_overrides: Optional[StorageGatewayClientConfig] = None,
) -> "capo_storage_gateway.types.set_smb_guest_password_output.SetSMBGuestPasswordOutput":
"""<p>Sets the password for the guest user <code>smbguest</code>. The <code>smbguest</code> user is the user when the authentication method for the file share is set to <code>GuestAccess</code>. This operation only supported for S3 File Gateways</p>
Args:
gateway_arn: <p>The Amazon Resource Name (ARN) of the S3 File Gateway the SMB file share is associated with.</p>
password: <p>The password that you want to set for your SMB server.</p>
Raises:
capo_storage_gateway.errors.internal_server_error.InternalServerError: <p>An internal server error has occurred during the request. For more information, see the error and message fields.</p>
capo_storage_gateway.errors.invalid_gateway_request_exception.InvalidGatewayRequestException: <p>An exception occurred because an invalid gateway request was issued to the service. For more information, see the error and message fields.</p>
capo_storage_gateway.errors.UnknownServiceError: The service returned an error code this client does not model.
"""
def _handler(
req: "OperationRequest[capo_storage_gateway.types.set_smb_guest_password_input.SetSMBGuestPasswordInput]",
) -> OperationResponse[
"capo_storage_gateway.types.set_smb_guest_password_output.SetSMBGuestPasswordOutput"
]:
import capo_storage_gateway._operations.storage_gateway_20130630.set_smb_guest_password
output, http_response = (
capo_storage_gateway._operations.storage_gateway_20130630.set_smb_guest_password.set_smb_guest_password(
req.options, req.input
)
)
return OperationResponse(output=output, response=http_response)
def _redact_input(
input_: "capo_storage_gateway.types.set_smb_guest_password_input.SetSMBGuestPasswordInput",
) -> dict[str, Any]:
import capo_storage_gateway.types.set_smb_guest_password_input
return capo_storage_gateway.types.set_smb_guest_password_input.redact_sensitive(
input_
)
interceptors_, options_ = self.operation_options(
config_overrides,
OperationLogging("SetSMBGuestPassword", redact_input=_redact_input),
)
input_: capo_storage_gateway.types.set_smb_guest_password_input.SetSMBGuestPasswordInput = {
"gateway_arn": gateway_arn,
"password": password,
}
response = execute_pipeline(
OperationRequest(input=input_, options=options_),
handler=_handler,
interceptors=list(interceptors_),
)
response.response.close()
return response.output