func ExampleSMS_StartOnDemandReplicationRun() { sess, err := session.NewSession() if err != nil { fmt.Println("failed to create session,", err) return } svc := sms.New(sess) params := &sms.StartOnDemandReplicationRunInput{ ReplicationJobId: aws.String("ReplicationJobId"), // Required Description: aws.String("Description"), } resp, err := svc.StartOnDemandReplicationRun(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleSMS_UpdateReplicationJob() { sess, err := session.NewSession() if err != nil { fmt.Println("failed to create session,", err) return } svc := sms.New(sess) params := &sms.UpdateReplicationJobInput{ ReplicationJobId: aws.String("ReplicationJobId"), // Required Description: aws.String("Description"), Frequency: aws.Int64(1), LicenseType: aws.String("LicenseType"), NextReplicationRunStartTime: aws.Time(time.Now()), RoleName: aws.String("RoleName"), } resp, err := svc.UpdateReplicationJob(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleSMS_GetServers() { sess, err := session.NewSession() if err != nil { fmt.Println("failed to create session,", err) return } svc := sms.New(sess) params := &sms.GetServersInput{ MaxResults: aws.Int64(1), NextToken: aws.String("NextToken"), } resp, err := svc.GetServers(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleSMS_DeleteServerCatalog() { sess, err := session.NewSession() if err != nil { fmt.Println("failed to create session,", err) return } svc := sms.New(sess) var params *sms.DeleteServerCatalogInput resp, err := svc.DeleteServerCatalog(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }
func ExampleSMS_DisassociateConnector() { sess, err := session.NewSession() if err != nil { fmt.Println("failed to create session,", err) return } svc := sms.New(sess) params := &sms.DisassociateConnectorInput{ ConnectorId: aws.String("ConnectorId"), // Required } resp, err := svc.DisassociateConnector(params) if err != nil { // Print the error, cast err to awserr.Error to get the Code and // Message from an error. fmt.Println(err.Error()) return } // Pretty-print the response data. fmt.Println(resp) }