fn associate_service_role_to_account(
        &self,
        input: AssociateServiceRoleToAccountRequest,
    ) -> RusotoFuture<AssociateServiceRoleToAccountResponse, AssociateServiceRoleToAccountError>
    {
        let request_uri = "/greengrass/servicerole";

        let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
        request.set_content_type("application/x-amz-json-1.1".to_owned());

        let encoded = Some(serde_json::to_vec(&input).unwrap());
        request.set_payload(encoded);

        self.client.sign_and_dispatch(request, |response| {
            if response.status.as_u16() == 200 {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;

                    if body == b"null" || body.is_empty() {
                        body = b"{}".to_vec();
                    }

                    debug!("Response body: {:?}", body);
                    debug!("Response status: {}", response.status);
                    let result =
                        serde_json::from_slice::<AssociateServiceRoleToAccountResponse>(&body)
                            .unwrap();

                    result
                }))
            } else {
                Box::new(response.buffer().from_err().and_then(|response| {
                    Err(AssociateServiceRoleToAccountError::from_response(response))
                }))
            }
        })
    }
/// <p>Associates a role with your account. AWS Greengrass will use the role to access your Lambda functions and AWS IoT resources. This is necessary for deployments to succeed. The role must have at least minimum permissions in the policy &#39;&#39;AWSGreengrassResourceAccessRolePolicy&#39;&#39;.</p>
Associates a role with your account. AWS Greengrass will use the role to access your Lambda functions and AWS IoT resources. This is necessary for deployments to succeed. The role must have at least minimum permissions in the policy ''AWSGreengrassResourceAccessRolePolicy''.
Associates a role with your account . AWS Greengrass will use the role to access your Lambda functions and AWS IoT resources . This is necessary for deployments to succeed . The role must have at least minimum permissions in the policy ' ' AWSGreengrassResourceAccessRolePolicy ' ' .
fn associate_service_role_to_account(
        &self,
        input: AssociateServiceRoleToAccountRequest,
    ) -> RusotoFuture<AssociateServiceRoleToAccountResponse, AssociateServiceRoleToAccountError>
    {
        let request_uri = "/greengrass/servicerole";
        let mut request = SignedRequest::new("PUT", "greengrass", &self.region, &request_uri);
        request.set_content_type("application/x-amz-json-1.1".to_owned());
        let encoded = Some(serde_json::to_vec(&input).unwrap());
        request.set_payload(encoded);
        self.client.sign_and_dispatch(request, |response| {
            if response.status.as_u16() == 200 {
                Box::new(response.buffer().from_err().map(|response| {
                    let mut body = response.body;
                    if body == b"null" || body.is_empty() {
                        body = b"{}".to_vec();
                    }
                    debug!("Response body: {:?}", body);
                    debug!("Response status: {}", response.status);
                    let result =
                        serde_json::from_slice::<AssociateServiceRoleToAccountResponse>(&body)
                            .unwrap();
                    result
                }))
            } else {
                Box::new(response.buffer().from_err().and_then(|response| {
                    Err(AssociateServiceRoleToAccountError::from_response(response))
                }))
            }
        })
    }
fn associate_service_role_to_account ( & self , input : AssociateServiceRoleToAccountRequest , ) -> RusotoFuture < AssociateServiceRoleToAccountResponse , AssociateServiceRoleToAccountError > { let request_uri = " " ; let mut request = SignedRequest :: new ( " " , " " , & self . region , & request_uri ) ; request . set_content_type ( " " . to_owned ( ) ) ; let encoded = Some ( serde_json :: to_vec ( & input ) . unwrap ( ) ) ; request . set_payload ( encoded ) ; self . client . sign_and_dispatch ( request , | response | { if response . status . as_u16 ( ) == 200 { Box :: new ( response . buffer ( ) . from_err ( ) . map ( | response | { let mut body = response . body ; if body == b" " || body . is_empty ( ) { body = b" " . to_vec ( ) ; } debug ! ( " " body ) ; debug ! ( " " response status ) ; let result = serde_json :: from_slice :: < AssociateServiceRoleToAccountResponse > ( & body ) . unwrap ( ) ; result } ) ) } else { Box :: new ( response . buffer ( ) . from_err ( ) . and_then ( | response | { Err ( AssociateServiceRoleToAccountError :: from_response ( response ) ) } ) ) } } ) }
<p>Associates a role with your account.
<p > Associates a role with your account .
&self
input
AssociateServiceRoleToAccountRequest
&self
input
AssociateServiceRoleToAccountRequest