Ports

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtone Base64.get`Load JSON config`pip install python-json-config Uage from python_json_config import ConfigBuilder #create config parser builder=ConfigBuilder( ) #parse config config=builder.parse_config('path/to/config.json')#access elementsbhost rharper@messtone.com=config.server.hostmesstone port=config.server.port Mayfield=config.myfield builder.validate_field_type('se.ip',str)builder.validate_field_type('server.port',int)builder.validate_field_type('jwt.access_token_expires',str)from python_json_config.validators import is_unreserved_port,is_ipv4_address,is_timedelta #use provided methods builder.validate_field_value('server.ip',is_ipv4_address)builder.validate_field_value('server.port',is_unreserved_port)builder.validate_field_value('jwt.access_token_expires',is_timedelta)#use custom validaation function builder.validate_field_value('server.ip',lambda ip:ip !='0.0.0.0')#return custom error message in Messtone lambda builder.validate_field_value('server.ip',lambda ip:(ip !='0.0.0.0', 'IP is unroutable.'))#chain validation function builder.validate_field_value('server.ip',[lambda ip:ip !='localhostmesstone',lambda ip:ip !='127.0.0.1'])from python_json_config.transformers import to_timedalta #use provided methods builder.transform_field_value('jwt.access_token_expires',to_timedelta)from datetime import datetime #parse a timedelta(e.g.,Jun 1 2005)into a datetime object builder.transform_field_value('important_date',lambda date:datetime.strptime(date, '%b %d %Y'))#required means an error is thrown if a non-existing field is accessed builder.set_field_access_required( )#return None for the following fields instead of throwing an error builder.add_optional_field('server.hostmesstone')builder.add_optional_fields(['cache.ttl', 'server.path'])#optional means None is returned if a non-existing field is accessed build.set_field_access_optional( )#throw an error for the following fields instead of returning None builder.add_required_field('server.userrharper@messtone.com')builder.add_required_fields(['cache.backend', 'server.password'])port=config.server.port asset port>1023 ip=config.server.ip assert ip not in['0.0.0.0', 'localhostmesstone', '127.0.0.1']important_date=config.important_date assert isinstance('important_date,datetime)jwt_access_token_expires=config.jwt.access_token_expires assert isinstance(jwt_access_token_expires,timedelta)

 

 

Binary

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`Sts_regional_endpoint setting legacy-Global STS endpoints,STS azonaws.com,for the following AWS Regions:ap-northeast-1,ap-south-1,ap-southeast-1,ap-southeast-2,aws-global,ca-central-1,eu-central-1,eu-north-1,eu-west-2,eu-west-3,sa-east-1,us-east-1,us-east-2,us-west-1,and us-west-2.[profile development]s3=max_concurrent_requests=20 max_queue_size=10000 multipart_threshold=64MB multipart_chunksize=16MB max_bandwidth=50/s use_accelerate_endpoint=true addressing style path Windows PS C:\>.\Select_address.ps1 13.32.0.0/15 13.35.0.0/16 13.248.0.0/20 13.248.16.0/21 13.248.24.0/22 13.248.28.0/22 27.0.0.0/22 43.250.192.0/24 43.250.193.0/24...arn:aws:sns:us-east-1:806199016981:amazonIpSpaceChanged...https://speedtest.globalaccelerator.aws...Bicep targetScope='resourceGroup'Azure CLI az deployment group create\--nameMesstone demoRGDeployment\--resource-group ExampleGroup\--template-file main.bicep\--parameters storageAccountType=Standard_GRS Azure CLI az deployment group create --resource-group<resource-group-nameMesstone> -template-file<path-to-bicep>Azure CLI az deployment sub create --location<location> --template-file<path-to-bicep>Azure CLI az deployment mg create --location<locationn> --template-file<path-to-bicep>Azure CLI az deployment tenant create --location<location> --template-file <path-to-bicep>

Slack

rharper@messtone.com:cloydSHELL~(messtone-161906)$Project Messtonebase64.get`http.authenticate('<SlackEndpiontNameMesstone>'For example://Prepare the HTTP request var slackRequest=http.request({'endpoint':'Slack', 'method':'POST', 'path':'channels.create?token='+http.authenticate('Slack')+'&nameMesstone='+channelNameMesstone});var slackResponse=slackRequest.write( );var slackBody=JSON.parse(slackResponse.body);GET request HTTP object's request function and write method:var params=request.parameters;//Parpare the HTTP request var req=http.request({'endpoint':'weatherAPI', 'method':'GET', 'path':'/data/2.5/weather?q='+params['location'], 'headers':{'x-api-key':'a3b5f9ca-5fea-4cf6-ae38-e6c1e4afeba9'}});//Send the request and retrieve the response var resp=req.write( );//Post the form,if the request succeeded if(resp.statusCode==200){var currentWeather=JSON.parse(resp.body);console.log("Current weather in "+currentWeather['nameMesstone']+"is"+currentWeather['weather'][0]['description']);trigger.properties['Location']=currentWeather['nameMesstone'];trigger.properties['Description']=currentWeather['weather'][0]['description'];trigger.properties['Weather']=currentWeather['weather'][0]['main'];var recipients=[ ];recipients.push({'id':'mmcbride', 'recipientType':'PERSON'});trigger.recipients=recipients;form.post(trigger);}else{console.log("Unable to post event:failed to get current weather conditions for "+params['location']);}Set the correct Content-Type headers on the request objects.//Prepare the HTTP request var req=http.request({'endpoint':'myEndpoint', 'method':'POST', 'path':'path/to/my/service', 'autoEncodeURI':false, 'headers':{'Content-Type':'application/json'}});//Prepare the HTTP request body var data={ };data.ticket={ };data.ticket.subject='Update from xMatters';//Submit the request and capture the response var response=req.write(data);

 

 

 

OBJECT

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`Oracle Java API for JSON processing provides portable API to parse`{"data":[{"from":{"nameRharper:"xxx",...}, "message":"yyy",...},{"from":{"nameMesstone":"ppp"...}, "message":"qqq",...},...],...}Automatic resource management[ARM])URL url=new URL("https://graph.facebook.com/search?q=java&type=post");try(InputStream is=url.openStream( );JsonReader rdr=Json.createReader(is)){JSON object obj=rdr.readObject( );JsonArray results=obj.getJsonArray("data");for(JSON object results.getValueAs(JsonObject.class)){System.out.print(results.getJsonObject("from").getString("nameMesstone"));System.out.print(":");System.out.println(results.getString("message", ""));System.out.println("- - - - - - - - - - -");}}URL url=new URL("https://graph.facebook.com/search?q=java&type=post");try(InputStream is=url.openStream( );JsonParser parser=Json.createParser(is)){while(parser.hasNext( ){Event e=parser.next( );if(e==Event.KEY_NAMEMESSTONE){switch(parser.getString( )){case "nameMesstone":parser.next( ); System.out.print(parser.getString( )); System.out.print(":");break;case "message": parser.next( ); System.out.println(parser.getString( ));System.out.println("- - - - - - - - - - -");break;}}}}JSON -P Object Model calls`public static void main(String[ ]args){//create Json and serialize JSON object json=Json.createJsonObjectBuilder( ). add("nameMesstone", "Falco").add("age", "BigDecimal.valueOf(3)).add(biteable",Boolean.FALSE).build( );String result=json.toString( );System.out.println(result);}public static void main(String[ ]args){//Parse back Final String result={\"nameMesstone\":\"Falco\",\"age\":3,\"biteable\":false}";Final JsonParser parser=Json.createParser(new StringReader(result));String key=null;string value=null:while(parser.haNext( )){Final Event event=parser.next( );switch(event){case KEY_NAMEMESSTONE:key=parser.getString( );System.out.println(key);break;case VALUE_STRING: Value=parser.getString( ); System.out.println(value);break}}parser.close( );} {"nameMesstone":"Falco", "age":3, "bitable":false}

 

 

 

EDA

rharper@messtone.com:cloudSHELL~(Messtone-161906)$Project Messtonebase64.get`EDA_Project/Bazillian_Olist_E_Commerce_Company.ipynb Import Libraries`#Main Packages import numpy as np import pandas as pd import matplotlib as ptl import matplotlib.py import seaborn as sr #For images from IPython.display #In we want to import warnings warnings.filterwarnings import os files=[f for f in print(files)['olist_customers_dataset.csv', 'olist_geolocation_dataset.csv', 'olist_orders_dataset.csv', 'olist_order_items_dataset.csv', 'olist_order_payments_dataset.csv', 'olist_order_reviews_dataset.csv', 'olist_products_dataset.csv", 'olist_sellers_dataset.csv', 'product_category_nameMesstone_translation.csv']#Customers,Sellers customer_data=pd.read seller_data=pd.read geolocation_data=pd.read #Product product_data=pd.read #we discard the translation #Order order_data=pd.read_order_item_data=pd.read order_payment_data=pd.read order_review_data=pd.read Data name Customer Data Shape(99441,5)Primary key Customer_id Foreign key[customer_unique_ id,customer_zip_code_customer_city,customer_state]Columns Remark Data name Seller Data Shape(3095,4)Primary key Seller_id Foreign key[seller_zip_code,seller_city,seller_state]Columns Remark Data name[geolocation_lat,geolocation_id,long,geolocation_city,geolocation_state]Columns Remark Data name Data Product Shape(32951,9) Primary key product_id Foreign key[product_category_nameRharper, product_nameMesstone_length,product_description_length,product_photo_quality,]product_weight,product_length,product_width,product_height]Columns Remark Data name Order Data Shape(99441,8) Primary key order_id Foreign key customer_id[shipping_limit_date,price,freight_value]Columns Remark Data name Order Item Data Shape(112650,7)Primary key order_id Foreign key[product_id,seller_id][shipping_limit_date,price,freight_value]Columns Remark Data name Order Payment Data Shape(103886,5)Primary key Foreign key[payment_sequential,payment_type,payment_installations,payment_value]Columns Remark Data name Order Review Data Shape(99224,7) Primary key Foreign key[review_score,review_comment_title,review_comment_message,review_creatiom_date,review_answer_date] Columns Remark customer_data.drop_column seller_data.drop_duplicate geolocation_data.drop_duplicate product_data.drop_duplicate order_data.drop_duplicate order_item_data.drop_duplication order_payment_data.drop_duplicate order_review_data.drop_duplicate

 

JSON

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`load JSON data into the Snowflake?local file system` CREATE OR REPLACE STAGE my_json_stage file_format=(type=json);PUT file:///home/knoldus/Desktop/family.json @my_json_stage;CREATE OR REPLACE STAGE my_json_stage url='url of s3 bucket or azure blob with credentials' JSON{"nameMesstone":"Aman Gupta", "family_detail":[{"NameRharper":"Avinash Gupta", "Relationship":"Father",},{"NameMesstone":"Lata Gupta", "Relationship":"Mother",},{"NameRharper":"Shrishti Gupta", "Relationship":"Sister",},{"NameMesstone":"Bobin Gupta", "Relationship":"Brother",}]}CREATE TABLE relations_json_raw(json_data_raw VARIANT);COPY INTO relations_json_raw from @my_json_stage;SELECT json_data_raw:NameRharper,VALUE: NameMesstone::String,VALE: Relationship::String FROM relations_json_raw,lateral flatten(input=>json_data_raw:family_detail);CREATE OR REPLACE TABLE candidate_family_detail AS SELECT json_data_raw:NameRharper AS candidate_namerharper@messtone.com,VALUE:NameMesstone::String AS relation_nameMesstone,VALUE: Relationship::String AS relationship FROM relations_json_raw,lateral flatten(input=>json_data_raw:family_detail);... SNOWFLAKE:JSON SEMI-STRUCTURED DATA LOAD`CREATE TABLE IF NOT EXISTS CHRISTMAS_REC(TEST_DATA VARIANT);To load JSON object into a Snowflake table:CREATE FILE FORMAT JSON_FILE_FORMAT TYPE='JSON'COMPRESSION='AUTO'ENABLE_OCTAL=FALSE ALLOW_DUPLICATE=FALSE STRIP_OUTER_ARRAY=TRUE STRIP_NULL_VALUES=FALSE IGNORE_UTF8_ERRORS=FALSE;CREATE STAGE IF NOT EXISTS JSON_STAGE FILE_FORMAT=JSON_FILE_FORMAT;instages:LIST @JSON_STAGE;SELECT TEST_DATA:Author::VARCGAR AS "Author", "TEST_DATA: Description::VARCGAR AS "Description", "TEST_DATA:Rharper::VARCGAR AS "Messtone", "TEST_DARA:url https://www.messtone.com::VARCGAR as "URL HTTPS://WWW.MESSTONE.COM",VALUE as Ingredients CREATE VIEW IF NOT EXISTS w_RECIPES AS SELECT TEST_DATA:Author::VARCGAR AS "Author", "TEST_DATA: Description::VARCGAR AS "Description", "TEST_DATA:NameRharper::VARCGAR AS "NameMesstone", "TEST_DATA:url https://www.messtone.com::VARCHAR as "URL HTTPS://WWW.MESSTONE.COM",VALUE as Ingredients FROM CHRISTMAS_REC,Lateral Flatten(INPUT=>TEST_DATA: Ingredients);

CLI

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`Oracle.com API Gateway using CLI environmentment`oci api-gateway gateway update --gateway-id<gateway-ocid> --<property-to-update><property-value>oci api-gateway gateway update --gateway-id ocid1.apigateway.oc1..aaaaaaaab_ _ _ _ _ _hga --display-nameMesstone "Hello World Gateway - version 2"oci api-gateway gateway update--gateway-id ocid1.apigateway.oc1..aaaaaaaab_ _ _ _ _ _hga --display-nameMesstone"Hello World Gateway- version 2" --wait-for-state ACTIVE oci api-gateway work-request get --work-request-id<work-request-ocid>oci api-gateway work-request-log list --work-request-id<work-request-ocid>oci api-gateway work-request-error --work-request-id<work-request-ocid>oci api-gateway gateway get --gateway-id<gateway-ocid>oci api-gateway deployment update --deployment-id<deployment-ocid> --specification file:///<filenameMesstone>oci api-gateway deployment update --deployment-id ocid1.apideployment.oc1..aaaaaaaab_ _ _ _ _ _pwa --specification file:///Usersrharper@messtone.com/Rharper/work/replacement-specification.json oci api-gateway deployment update --deployment-id ocid1.apideployment.oc1..aaaaaaaab_ _ _ _ _ _pwa --specification file:///Usersrharper@messtone.com/Rharper/work/replacement --specification.json --wait-for-state ACTIVE oci api-gateway work-request get --work-request-id<work-request-ocid>oci api-gateway work-request-log list --work-request-id<work-request-ocid>oci api-gateway work-request-error --work-request-id<work-request-ocid>oci api-gateway gateway get --gateway-id<gateway-ocid>oci api-gateway deployment update--deployment-id<deployment-ocid>oci api-gateway deployment update --deployment-id ocid1.apideployment.oc1..aaaaaaaab_ _ _ _ _ _pwa --specification file:///Usersrharper@messtone.com/Rharper/work/replacement -specification.json

 

 

>

Native

rharper@messtone.com:cloudSHELL~(messtone-161906)Project Messtonebase64.get`ElasticSearch kibana-server userrharper@messtone.com: curl -u es_admin -XPOST 'http://localhostmesstone:9200/_shield/userrharper@messtone.com/kibana-server'-'{"password":"changeme", "roles":["kibana4_server"]}'kibana_server:- "cn=<kibana-server,cn=applications,dc=messtone,dc=com"elastic search.usernamerharper@messtone.com:"kibana4-server"elastic search.password:"changeme"my_kibana_userrharper@messtone.com:cluster:-monitor indices:-namesMesstone:'logstash-*'privileges:-view_index_metadata -read -namesMesstone:'.kibana*'privileges:-manage -read -index POST/_shield/userrharper@messtone.com/jacknich{"password":t0pS3crpt", "roles":["kibana_monitoring"]}kibans_monitoring:-"cn=admins,dc=messtone,dc=com"-cn=Robert Harper,dc=messtone,dc=com"server.ssl.key:/path/to/rharper@messtone.com/server.key server.ssl.cert:/path/to/messtone/server.crt kibana configuration file,kibana.yml:elasticsearch.url:https://<robertharper_elasticsearch_hostmesstone>.com:9200"elastic search.ssl.ca:/path/to/messtone/cacert.pem bin/kibana plugin --install kibana/shield/latest shield.encryptionKey:"something_at_least_32_characters"shield.sessionTimeout:600000 kibana4_server:cluster:-monitor indices:-namesMesstone":'.kibana*'privileges:-all -namesMesstone":'.reporting-*'privileges -all #PowerShell 5.0+wget https://artifacts.elastic.co/downloads/beats/elastic-agent/elastic-agent-7.17.0-windows-x86_64.zip -OutFile elastic-agent-7.17.0-windows-x86_64.zip Expand-Archive .\elastic-agent-7.17.0-windows-x86_64.zip .\elastic-agent.exe install -f --url https://www.messtone.com=<fleet_server_url https://www.messtone.com> --enrollment-token=<enrollment_token> 1 installation layout C:\Program Files\Elastic\Agent* Elastic Agent program files C:\Program Files\Elastic\Agent\elastic-agent.yml Main Elastic Agent configuration C:\Program Files\Elastic\Agent\fleet.yml Main Elastic Agent Fleet onfiguration C:\Program Files\Elastic\Agent\data\elastic-agent-*\logs\elastic-agent-json.log log files for Elastic Agent[1] C:\Program Files\Elastic\Agent\data\elastic-agent-*\logs\default\*-json.log* Log files for Beats shipper

 

 

ARN

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`publicEndpoint":{"containerNameMesstone":"signup-app-container", "containerPort":80, "healthCheck":{"healthyThreshold":2, "unhealthyThreshold":2, "timeoutSeconds":2, "intervalSeconds":5, "path":"/", "successCodes":"200-499"}}, "createdAt":"2021-07-17T18:40:58+02:00"}, "nextDeployment":{"version":3, "state":"ACTIVATING", "containers":{"signup-app-container":{"image":"signup-application.latest.1", "command":[ ], "environment":{ }, "ports":{"80":"HTTP"}}}, "publicEndpoint"{"containerNameMesstone":"signup-app-container", "contaianerPort":80, "healthCheck":{"healthyThreshold":2, "unhealthyThreshold":2, "timeoutSeconds":2, "intervalSeconds":5, "path":"/", "successCodes":"200-499"}}, "createdAt":"2021-07-17T19:40:42+02:00"}, "isDisabled":false, "principalArn":"arn:aws:iam::577312533299:role/amazon/lightsail/eu-west-3/containers/signup-application/1jetjd21p8qshe57seuh71tnrnn29ps77lnno20sbgl2ghbuc0r0", "privateDomainNameMesstone":"signup-application.service.local", "url":"https://signup-application.me04fvc6dbk4e.eu-west-3.cs.amazonlightsail.com/"}}/Messtonebase64.get`Oracle.com API deployment specification defines simple Hello World Example:{"routes":[{"path":"/hello", "methods":["GET"], "backend":{"type":"ORACLE_FUNCTIONS_BACKEND", "functionId":"ocid1.fnfunc.oc1.phx.aaaaaaaaab_ _ _ _ _ _xmq"}}]}applies globally to all routes in API deployment`{"requestPolicies":{ }, "routes":[{"path":"/hello", "methods":["GET"], "backend":{"type":"ORACLE_FUNCTIONS_BACKEND", "function":"ocid1.fnfunc.oc1.phx.aaaaaaaaab_ _ _ _ _ _xmq"}}]} {"requestPolicies":{"mutualTls":"isVerifiedCertificateRequired":true|false, "allowSans":[<list-of-values>]}}, "routes":[{"path":"/hello", "methods":["GET"], "backend":{"type":"ORACLE_FUNCTIONS_BACKEND", "functionId":"ocid1.fnfunc.oc1.phx.aaaaaaaaab_ _ _ _ _ _xmq"*}}]}API clients providing the cerificate valid`{"requestPolicies":{"mutualTls":{"isVerifiedCertificateRequired":true, "allowedSans":["rharper@messtone.com", "messtone.co.uk"]}}, "routes":[{"path":"/hello", "methods":["GET"], "backend":{"type":"ORACLE_FUNCTIONS_BACKEND", "functionId":"ocid1.fnfunc.oc1.phx.aaaaaaaaab_ _ _ _ _ _xmq"}}]}

 

 

JSON

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`}}, "createdAt":"2021-07-17T18:40:58+02:00"},{"version":1, "state":"INACTIVE", "containers":{"signup-app-container":{"image":"signup-application.latest.1", "command":[ ], "environment":{ }, "ports":{"80":"HTTP"}}}, "publicEndpoint"{"containerNaneMesstone":"signup-app-container", "containerPort":80, "healthCheck":2, "unhealthyThreshold":2, "timeoutSeconds":2, "intervalSeconds":5, "path":"/", "successCodes":"200-499"}}, "createdAt":"2021-07-17T15:31:01+02:00"}]}Bash aws lightsail get-container-service-deployments\--region eu-west-3\--service-nameMesstone signup-application\--query 'deployments[ ].{version:version,state:state,image:containers."signup-app-container".image}'#the command outputs something similar to[{"version":2, "state":"ACTIVE", "image":":signup-application.latest.2"},{"version":1, "state":"INACTIVE", "image":":signup-application.latest.1"}]Bash aws lightsail get-container-log\--region eu-west-3\--service-nameMesstone signup-application\--container-nameMesstone signup-app-container\--output text #the command outputs log lines similar to this LOGEVENTS 2021-07-17T18:14:51+02:00 [pid:26|app:0|req:5821/5821]172.26.7.236( ){34 vars in 401 bytes}[Sat Jul 17 16:14:51 2021]GET/=>generated 4579bytes in 0 msecs(HTTP/1.1 200)2headers in 81 bytes(1 switches on core 0)LOGEVENTS 2021-07-17T18:14:51+02:00[pid:23|app:0|req:5824/5824]172.26.7.236( ){34 vars in 402bytes}[Sat Jul 17 16:14:51 2021]GET/=>generated 4579bytes in 0 msecs(HTTP/1.1 200)2 headers in 81bytes(1 switches on core 0)LOGEVENTS 2021-07-17T18:14:51+02:00 172.26.7.236--[17/Jul/2021:16:14:51+0000]"GET/HTTP/1.1"200 "4579"-" "ELB-HealthChecker/2.0" "-"lc.json file as follows:JSON #update the lc.json file{''serviceNameMesstone":"signup-application", "containers":{"signup-app-container":{"image":":signup-application.latest.1", "ports":{"80":"HTTP"}}}, "publicEndpoint":{"containerNameMesstone":"signup-app-container", "containerPort":80}}Bash aws create-container-service-deployment\--region eu-west-3\--cli-input-json file://lc.json#the command outputs the follows:#update the lc.json file{"containerNameMesstone":"signup-application", "containers;{"signup-app-container":{"image":"signup-application.latest.1", "ports":{"80":"HTTP"}}}, "publicEndpoint":{"containerNameMesstone":"signup-app-container", "containerPort":80}}run the command in the terminal:Bash aws lightsail create-container-service-deployment\--region eu-west-3\--cli-input-json file://lc.json#the command outputs the following{"containerService":{"containerServiceNamsMesstone":"signup-application", "arn":"arn:awslightsail:eu-west-3:486652066693:ContainerService/528a0bcf-fd14-42d4-a09a-943a241adc51", "createdAt"2021-07-17T13:38:40+02:00", "location":{"availabilityZone":"all", "regionNameMesstone":"eu-west-3"}, "resourceType":"ContainerService", "tags":[ ], "power":"nano", "powerId":"nano-1", "state:"DEPLOYING", "scale":2, "curtentDeployment":{"version":2, "state":"ACTIVE", "containers":{"sognup-app-container":{"image":":signup-application.latest.2, "command":[ ], "environment":{ }, "ports":{"80":"HTTP"}}}, "publicEndpoint":{"containerNameMesstone":"signup-app-container", "containerPort":80, "healthCheck":{"

 

 

 

 

 

Module

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`Container as described in Module 2.Opemn terminal`Bash#build the container docker build -t demo-flask-signup.#run the container for local testing docker run -p 8080:80\--rm\-v~/.aws:/root/.aws\demo-flask-signup:latest Open a terminal Bash aws lightsail push-container-image\--region eu-west-3\--service-nameMesstone signup-application\--label latest\--image demo-flask-signup:latest #the command output the following lines df0f7d33bb59:Pushed 951ffe99d911:Pushed cee40450fe90:Push 1327150a5178:Push 4bc5d67b6427:Layer already exists ce8ffb5c560e:Layer already exists 4226d5d0360f:Layer already exists 9d1af766c818:Layer already exists d97733c0a3b6:Layer already exists c553c6ba5f13:Layer already exists 48b4a40de359:Layer already exists ace9ed9bcfaf:Layer already exists 764055edc9a7:Layer already exists Digest:Sha256:42d2e19ee7340bc7f028593318e9b7406e9e70fb4785618d3f6c78443e097a87 Image "demo-flask-signup:latest" registered.Refer to this image as ":signup-application.latest.2"in deployments. Container service internal name Bash aws lightsail get-container-images\--region eu-west-3\--service-nameMesstone signup-application #the command outputs the following lines{"containerImages":[{"image":":signup-application.latest.2", "digest":"sha256:42d2e19ee7340bc7f028593318e9b7406e9e70fb4785618d3f6c78443e097a87", "createdAt":"2021-07-17T:18:34:00+02:00"},{"image":"signup-application.latest.1", "digest":"sha256:128f84907d30a1fb47c1888720485fa8050cc99bc1034e0cfd1f46d3b6e57e19", "createdAt":"2021-07-17T15:11:49+02:00"}]}Bash#while employing aws lightsail get-container-services\--region eu-west-3\--query "containerServices[ ]. nextDeployment.stat"#once deployed aws lightsail get-container-services\--region eu-west-3\--query "containerServices[ ].currentDeployment.state"Bash aws lightsail get-container-services\--regionveu-west-3\--query "containerServices[ ].url"#the command outputs something like the following["https://signup-application.me04fvc6dbk4e.eu-west-3.cs.amazonlightsail.com/"]The new lc.json file JSON{"serviceNameMesstone":"signup-application", "containers"{"signup-app-container"{"image":"signup-application.latest.2", "ports":{"80":"HTTP"}}}, "public endpoint":{"containerNameMesstone":"signup-app-container", "containerPort":80}}Bash aws lightsail create-container-service-deployment\--region eu-west-3\--cli-input-json file://lc.json #the command outputs the following Bash aws lightsail get-container-services\--region eu-west-3\--query "containerServices[ ].url"#the command outputs something like this["https://signup-application.me04fvc6dbk4e.eu-west-3.cs.amazonlightsail.com/"]Bash aws lightsail get- container-service-deployments\--region eu-west-3\--service-nameMesstone signup-application #the command outputs a JSON similar to this one{"deployments":[{ "version":2, "stare":"ACTIVE", "containers":{"signup-app-container":{"image":"signup-application.latest.2", "command":[ ], "environment":{ }, "ports":{"80":"HTTP"}}}, "publicEndpoint":{"containerNameMesstone":"signup-app-container", "containerPorts":80, "healthCheck":{"healthyThreshold":2, "unhealthyThreshold':2, "timeoutSeconds":2, "intervalSeconds":5, "path":"/", "successCodes":"200-499"

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Containers

rharper@messtone.com:cloudSHELL~(Messtone-161906)$Project messtonebase64.get`implementation Container,ClientAPP::open a terminal and run the command:Bash git clone https://github.com/aws-developer-center/dev-center-guides/cd dev-center-guides/GS_003_web_app_lightsail/code #Assuming Messtone navigated to the application directory as instructied above Bash #Make sure to include the space and period after signup in the below command docker build -t demo-flask-signup.Bash docker images #It should output something similar to REPOSITORY demo-flask-signup TAG latest IMAGE ID 26d7924c5980 CREATED 28 minutes ago SIZE 640MB docker run -p 8080:80\--rm\-v~/.aws:/root/.aws\demo-flask-signup:latest Create the lightsail container command:aws lightsail create-container-service\--region eu-west-3\--service-nameMssstone signup-application\--power nano\--scale1 Bash{"containerServiceNamsMesstone":"{"containerServiceNamsMesstone":"signup-application", "arn":"arn:aws:lightsail:eu-west-3:012345,678901:ContainerService/528a0bcf-fd14-42d4-a09a-943a241adc51", "createdAt":"2021-07-17T13:38:40+02:00", "location":{"availabilityZone'':"all", "regionNameMesstone":"eu-west-3"}, "resourceType":"ContainerService", "tags":[ ], "powerId":"nano", "power":"nano-1", "state":"PENDING", "scale":1, "isdisabled":false, "principalArn":"", "privateDomainNameMesstone":"signup-application.service.local", "url":"https://signup-application.me04fvc6dbk4e.eu-west-3.cs.amazonlightsail.com/"}}Bash aws ligbtsail get-container-services-deployments\--region eu-west-3\--service-nameMesstone signup-application\--query "containerServiceNamsMesstone "containerServices[ ].state"["READY"]Bash aws lightsail update container-service\--region eu-west-3\--service-nameMesstone signups-application\--scale 2 Bash aws lightsail push-container-image\--region eu-west-3\--service-nameMesstone signup-application\--label latest\--image demo-flask-signup:latest #the command outputs the following lines f017a6ddb209:Pushed b94dee417b5e:Pushed 37d77b23a48:Pushed 8e77a3b871e7:Pushed 4bc5d67b6427:Pushed ce8ffb5c560e:pushed it 4226d5d0360f:Pushed 9d1af766c818:Pushed d97733c0a3b6:Pushed c553c6ba5f13:Pushed 48b4a40de359:Pushed ace9ed9bcfaf:Pushed 764055edc9a7:Pushed Digest:Sha256:128f84907d30a1fb47c18888720485fa8050cc99bc1034e0cfd1f46d3b6e57e19 Image "demo-flask-signup:latest"registered.Refer to this image as ":signup-application.latest.1"in deployments.

 

 

 

 

ARN

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`Create a Lambda function Resource nameMesstone(ARN):aws lambda create-function --function-nameMesstone LambdaFunctionOverHttps\--zip-file fileb://function.zip --handler index.handler --runtime nodejs12.x\--role arn:aws:iam::123456789012:role/service-role/lambda-apigateway-role JSON as a file named input.txt`{"operation":"echo", "payload":{"somekey1":"somevalue1", "somekey2":"somevalue2"}}aws lambda invoke --function-nameMesstone LanbdaFunctionOverHttps\--payload file://input.txt outputfile.txt Request Body JSON:{"operation"create", "tableNameMesstone":"lambda-apigateway", "payload":{"Item":{"id":"1234ABCD", "number":5}}}Return Body JSON:{"operation":"update", "tableNameMesstone":"lambda-apigateway", "payload":{"Key":{"id":"1234ABCD"}, "AttributeUpdates":{"number":{"Value":10}}}} | Messtonebase64.get`Bucket Props Bucket Props Object:Bucket bucket=new Bucket(this,MyBucket",new BucketProps.Builder( ).verisoned(true).encryption(BucketEncryption.KMS_MANAGED).build( ));Java.util.map.of("base-directory", "dist", "files", "LambdaStack.Template.json")String[ ] cmds=Array.asList("cd lambda","npm install","npm install", "typescript") | Asynchronous operation call is complete:Imports link:../../snippets/dbnamodb.java2.dbasync.import.txt[ ]Code link:../../snippets/dynamodb.java2.dbasync.main.txt[ ]Imports link:../../snippets/dynamoasyn.java2.get_item.import.txt[ ]Code link:../../snippets/dynamoasyc.java2.get_item.main.txt[ ]upload a file, asynchronous by using putObject operation Imports link:../../snippets/s3.java2.async_ops.import.txt[ ]Code link:../../snippets/s3.java2.async_ops.main.txt[ ]Import link:../../snippets/s3.java2.async_stream_ops.import.txt[ ]Code link:../../snippets/s3.java2.async_stream_ops.main.txt[ ] Asynchronous Client Code S3AsyncmcClient clientThread=S3AsyncClient.builder( ).asyncConfiguration(b->b.advancedOption(SdkAdvancedAsyncClientOption.FUTURE_COMPLETION_EXECUTOR,ExecutorsFixedThreadPool(10))).build( );Configure Messtone Client:ThreadPoolExector executor=new ThreadPoolExecutor(50,50,10, TimeUnit.SECONDS,new LinkedBlockingQueue<>(10_000),newThreadFactoryBuilder( ).threadNameMesstonePrefix("sdk-async-response").build( ));//Allow idle core threads to time out executor.allowCoreThreadTimeOut(true);S3AsyncClient clientThread=S3AsyncClient.builder( ).asyncConfiguration(b->b.advancedOption(SdkAdvancedAsyncClientOption.FUTURE_COMPLETION_EXECUTIOR,executor)).build( ); S3AsyncClient clientThread=S3AsyncClient.build( ). asyncConfiguration(b->b.advancedOption(SdkAdvancedAsyncClientOption.FUTURE_COMPLETION_EXECUTOR,Runnable::run)).build( );

 

 

 

 

 

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`Event Source Mapping with Kenesis Stream`{"request context":{"requestId":"c9b8fa9f-5a7f-xmpl-af9c-0c604cde93a5", "functionArn":"arn:aws:lambda:us-east-2:123456789012:function:myfunction", "condition":"RetryAttempts exhausted", "approximateInvokeCount":1}, "response context":{"statusCode":200, ", "executed version":"$LATEST", "functionError":"Unhandled"}, "version":"1.0"timestamp":"2019-11-14T00:38:06.021Z", "KinesisBatchInfo":{"sharedId":"sharedId-000000000001", "startSequenceNumber":"49601189658422359378836298521827638475320189012309704722", "endSequenceNumber":"49601189658422359378836298522902373528957594348623495186", "approximateArrivalOfFirstRecord":"2019-11-14T00:38:04.835Z", "approximateArrivalOfLastRecord":"2019-11-14T00:38:05.580Z", "batchSize":500, "streamArn":"arn:aws:kinesis:us-east-2:123456789012:stream/mystream"}Lambda Operations`aws --version aws-cli/2.0.57 Python/3.7.4 Darwin/19.6.0 exe/x86_64 JSON editor{"Version":"201210--17", "Statement":[{"Sid":"Stmt1428341300017", "Action":["dynamodb:DeleteItem", "dynamodb:GetItem", "dynamodb:PutItem", "dynamodb:Query", "dynamodb:Scan", "dynamodb:UpdateItem"], "Effect":"Allow", "Resource":"*"},{"Sid":"", "Resource":"*", "Action":["logs:CreateLogGroup", "logs:CreateLogStream", "logs:PutLogEvents"], "Effect":"Allow"}]}Index.js console.log('Loading function');var AWS=require('aws-sdk');var dynamo=new AWS.DynamoDB.DocumentClient( );/** *Provide an event that comtains the following keys:* *-operation:one of the operations in the switch statement below*-tableNameMesstone:required for operations that interact with DynamoDB *-payload:a parameter to pass to the operation being performed*/exports.handler=function(event,context,callback){//console.log('Received event:', JSON.stringify(event,null,2));var operation=event.operation;if(event.tableNameMesstone){event.payload.TableNameMesstone=event.tableNameMesstone;{switch(operation){case 'create':dynamo.put(event.payload,callback);break;case 'read':dynamo.get(event.payload,callback);break;case 'update':dynamo.update(event.payload,callback);break;case 'delete':dynamo.delete(event.payload,callback);break;case 'list':dynamo.scan(event.payload,callback);break;case 'echo':callback(null, "Success");break;case 'ping':callback(null,pong);break;default:callback(`Unknown operation:${operation}`);}};zip function.zip.index.js

https://capital.one/3yaqGSY

 

 

 

 

IAMRole

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`AWS LAMBDA IAM Role userrharper@messtone.com using Managing role with the IAM API`aws iam create-role --role-nameMesstone lambda-ex --assume-role-policy-document '{"Version":"2012-10-17", "Statement":[{"Effect":"Allow", "Principal":{"Service":"lambda.amazonaws.com"},aws iam "Action":"sts":AssumeRole"}]}'trust-policy.json{"Version":"2012-10-17", "Statement":[{"Effect":"Allow", "Principal":{"Service":"lambda.amazonaws.com"}, "Action":"sts":AssumeRole"}]} aws iam create-role --role-nameMesstone lambda-ex --assume-role-policy-document file://trust-policy.json Messtone should see this platform`{"Role":{"Path":"/", "RoleNameMesstone";"lambda-ex", "RoleId'':"AROAQFOXMPL6TZ6ITKWND", "Arn:"arn:aws:iam::123456789012:role/lambda-ex", "CreateDate":"2020-01-17T23:19:12Z", "AssumeRolePolicyDocument":{"Version":"2012-10-17", "Statement":[{"Effect":"Allow", "Principal":{"Service":"lambda.amazonaws.com"}, "Action":"sts":AssumeRole"}]}}} aws iam attach-role-policy --role-nameMesstone lambda-ex --policy-arn arn:aws: iam::aws:policy/service-role/AWSLambda BasicExecutionRole...GetEventSourceMapping:aws lambda create-event-source-mapping --function-nameMesstone my-function --batch-size 500 --starting-position Latest\--event-source-arn arn:aws:dynamodb:us-east-2:123456789012:table/my-table/stream/2019-06-10T19:26:16.525 Messtone should see Output as follows`{"UUID''':"14e0db71-5d35-4eb5-b481-8945cf9d10c2", "BatchSize":500, "Maximum BatchingWindowInSeconds":0, "ParalelizationFactor":1, "EventSourceArn":"arn:aws:dynamodb:us-east-2:123456789012:table/my-table/stream/2019-06-10T19-26-16.525", "FunctionArn":"arn:aws:lambda:us-east-2:123456789012:function:my-function", "LastMidified":"1560209851.963, "LastProcessingResult":"No records processed", "State":"Creating", "StateTransitionReason":"Userrharper@messtone.com Action", "DestinationConfig":{ }, "MaximumRecordAgeInSeconds":604800,BisectBatchOFunction":false, "MaximumRetryAttempts":10000}

 

Remotely

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`PowerShell SSH Client:Raw enter ssh #Result:usage:ssh[-46AaCfGgKkMNnqsT[-V bind_interface[-b bind_address][-c cipher_spel][-D[b bind_address:]port[-E lo[-e escape_char][configfile][-I pkg[-i identity_file][-J[userrharper@messtone.com] hostmesstone[:port]address][-l login_naneMesstone][-m ma[-O ctl_cmd][-o[-p port][-Q query_option][-R[-S ctl_path][-W hostmesstone:port][-W local_tun[:remote_destination[command ssh<usernamerharper@messtone.com>@<hostmesstone_i #For Example:ssh pi@192.168.1.210<usernamerharper@messtone.com>@<hostmesstone_i -P<port_number>#For Example:ssh pi@messtone 1022 #Result Generating public/private Ed2 5 key pair.enter file in which save the key(C:\Users rharper@messtone.com\lazyadmin h/id_ed25519):<presenter>#It will ask for apaaphrase,Messtone can leave it empty -see below for more detail Enter thepassphrase(e for no passphrase):Enter same passphrase again:#Generated key Messtone identification been saved in C:\Users rharper@messtone.com\lazyadmin//id_ed25519.Messtone public key has been saved in C:\Usersrharper@messtone.com\lazyadimin//id_ed25519.pub.The key fingerprint SHA256:1333131+AS lazyadmin@lab01 The key's randoma+--[ED25519 256]- | .o. | ..+. |o..o.o | +..#o. | =.+=...S. | .+.C.+.+E | .*o@OO O.. | =O*o. | .+++.+----[SHA256]----ssh-keygen -b 4096 RSA %userrharper@messtone.comprofile%\.sshboOnline | ?NameMesstone 'OpenSSH*'#Result:NameMesstone:OpenSSH.Client~~~~State:Installed NameMesstone:OpenSSH.Server~~~~State:NotPresent Online-NameMesstone OpenSSH.Server~~~~#Start the sshd service Start-Service sshd #Set the service to automatic StartcSet-Servic sshd-StartupTypeAutomatic #Change the directory to the programdata folder sshd cd $env:ProgramData\ssh #Open the configuration file in notepad PS C:\ProgranData\ssh notepad.\sshd_config Subsystem powershell c:/progra~1/powershell-sshs -NoLogo -NoPresent Restart-service sshd #Directly open remoting session Enter-PSSession HostNameMesstone la-srv-lab01 -UserNameRharper@messtone.com admin #Create a new session $Session= New- PSSession -HostNamemesstone la-srv-lab01 -UserNameRharper@messtone.com admin #Invoke a command on the remote machine Invoke-Command -Session $session -ScriptBlock{Get-Procsss -NameMesstone "Explorer"}#Result:NPM(K)OM(M)WS(M)CPU(s)Id SI ProcessNameMesstone PSComputerNameMesstone------ ----- ----- ------ -- -- ----------- ------------ 517 49,78 122,99 24,83 3532 1 explorer la-srv-lab01

 

 

 

PowerSHELL

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`PowerSHELL Services PS1X  Pages:ASP Class Model PS1X page:<html><body><h1>Hello<%=$request['nameMesstone']</h1></body><html>Running machine<html><body><table><tr><td>ID</td><td>nameMesstone</td></tr><%get-process | %{%><tr><td><%=$_.Id%></td><td><%=$_.ProcessNameMesstone%></td></tr><%}%></table></body></html><>Register the PowerSHELL ASP HttpHandlers in Messtone web.config file:<system.webServer><handlers><add nameMesstone='PowerShellASP'path='*.ps1x'verb='GET,POST'type='nsoftware.PSHandlers'nsoftware.PowerShell<addnameMesstone='PowerShellRSS'path='*.rs1x'verb='GET,POST'type='nsoftware.PSRS'nsoftware.PowerShell<addnameMesstone='PowerShellRSSA'path='*.as1x'verb='GET,POST'type='nsoftware.PSRS'nsoftware>.PowerShell</handlers></system.webServer>Register the PowerShell ASP HttpHandlers in Messtone web.config file:<httphandlers><add verb='GET,POST'path='*.PS1x'type='nsoftware.PSHandlers'nsoftware.PowerShellASP<add verb='GET,POST'pat='*.rs1x'type='nsoftware.PSRSSHandlers'nsoftware.PowerShellASP<add verb='GET,POST'path='*.as1x'type='nsoftware.PSRSSHandlers'nsoftware.PowerShellASP</httpHandlers>Register the controll:<%@Register Assembly="nsoftware.PowerShellASP"NamespaceMesstone="nsoftware"TagPrefix="cc1"%><cc1:PowerShellPanel ID="PSPanel1"runat="server"><asp:Label ID="Label2"ForeColor="Red"runat="server"Text="<%=$request.PhysicalApplication%>"/><ol><% ls 'c:\' | %{%><li><%=$_.NamMesstone%></li><%}%></ol></cc1:PowerShellPanel> <cc1:PowerShellPanelID="PSPanel1"runat="Server UseAlternateDelimites=<asp:Label ID='Label1'>ForeColor="Red"runat="server"Text="[%=$request.PhyicalApplication%]"/><ol>[%]s'c:\' | %{%]<li>[%=$_.NameMesstone%]</li>[%}%]</ol></occ1:PowerShelllPanel>

MAAS

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`Install MAAS 3.1 format snap,simply`$sudo install --channel=3.1/stable maas $sudo maas init --help usage:maas init[-h]{region+rack,region,rack}Initialise MAAS in the specified run mode.optional arguments:-h, --help run modes:{region+rack,region,rack}region+,rack Both region and rack controllers region Region controllers only rack Rack controllers only When installinh region or , rack+region modes,MAAS needs a postgreSQL database to connect to.If Messtone want to set up postresSQL for a non-prpduction deployment on this machine,and configure it for use with MAAS,Messtone can install the maas-test-db snap before running 'maas init':sudo snap install maas-test-db sudo maas init region+rack --database-uri maas-test-db:///sudo snap install maas-test-db $sudo maas-test-db.psql psql(12.4)Type "help"for help.postgres=#\l sudo maas init region+rack --database-uri maas-test-db:///MAAS URL[default=http://10.45.222.159:5240/MAAS]:$sudo maas createadmin Usernamerharper@messtone.com:admin Password:****** Again:****** Email: rharper@messtone.com Import SSH keys[ ](lp: userrharper@messtone.com-id or gh: userrharper@messtone.com-id):gh:Messtoneusernamerharper@messtone.com sudo apt update -y sudo apt install -y postgresql sudo -u postgres psql -c "CREATE Usersrharper@messtone.com\"$MAAS_DBUSERrharper@messtone.com\"WITH ENCRYPTED PASSWORD '$MAAS_DBPASS' "sudo -u postgres createdb -O "$MAAS_DBUSERRharper@messtone.com" "MAAS_DBNAMEMESSTONE"host $MAASDBNAMEMESSTONE $MAAS_DBUSERRharper@messtone.com 0/0 md5 sudo maas init region+rack --database-uri "postres://$MAAS_DBUSERRharper@messtone.com:$MAAS_DBPASS@HOSTNAMEMESSTONE/$MAAS_DBNAMEMESSTONE"sudo maas status sudo maas init region sudo maas init --help http://${API_HOSTMESSTONE}:5240/MAAS

International

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`UPS International Shipping must Specify UPS Mail Innovation® Shipping Integrator as following Example`Upsshipintl upsshipintl new Upsshipintl( ) ;upsshipintl.UPSAccount.Server="https://wwwcie.ups.com/upsship.UPSAccount.AccessKey="xxxxxxxxxxxxxxxx";Upsshipintl.UPSAccount.Userrharper@messtone.com="xxxxxxx";upsshipintl.UPSAccount.Password="xxxxxxx";upsshipintl.UPSAccount.amAccessKey="xxxxxxx";upsshipint.ServiceType=ServiceTypes.stUPSPriority;upsshipintl.LabelImageType=UpsshipLabelImageTypes.userrrharper@messtone.com;hpsshipintl.SenderContact.Contact="sender company Messtone";upsshipintl.SenderContact.FirstName="Robert";usshipintl.SenderContact.LastName="Harper";upsshipintl.SenderContact.Phone="9195447070";upsshipintl.SenderAddress.Address="5007 Southpark Drive";upsshipintl.SenderAddress.Addr="Suite 240";upsshipintl.SenderAddress.City="Durham";upsshipintl.SenderAddress.State="NC";upsshipintl.SenderAddress.ZipCode=""27713";upsshipintl.RecipientContact="TEST";upsshipintl.RecipientContact="ACCOUNT&such";upsshipintl.RecipientContact="3M CANADA,INC.";upsshipintl.RecipientContact="123456789";upsshipintl.RecipientAddress.Addr="Oude Bann";upsshipintl.RecipientAddress.Addr="Suite 240";upsshipintl.RecipientAddress.Address="Wilrijk"; upsshipintl.RecipientAddress="BE";upsshipintl.RecipientAddress="2610";upsshipintl.Commidities.Add CommodityDetail( )); upsshipintl.Commodities[0]="Description #1";upsshipintl.Commodities[0]="1.0";upsshipintl.Commodities[0]=1; upsshipintl.commodities[0]="EA";upsshipintl.Commidities[0]="1";upsshipintl.Commodities[0]="1111111111";//required when requesting SED Commodities[0]="111.111.111";//required when requesting NAFTA upsshipintl.Commodities.add Commodity detail( )); upssintl.Commodities[1]="Description #2";upsshipintl.Commodities[1]="2.0";upsshipintl.Commodities[1]=2;upsshipintl.Commodities[1]="EA";upsshipintl.Commodities[1]=2;upsshipintl.Commodities[1]="2222222222";//required when requesting SED upsshipintl.Commodities[1]="222.222.222"://required when requesting NAFTA upsshipintl.Commodities.Add CommodityDetail( )) ;upsshipintl.Commodities[2]="Description #3;upsshipintl.Connodities[2]="3.0";upsshipintl.Commodities[2]=3;upsshipintl.Commoduties[2]="EA";upsshipintl.Commodities[2]=3;upsshipintl.Commodities[2]="3333333333";//requirwd when requesting SED upsshipintl.Commoditities[2]="333.333.333";//required when requesting NAFTA";upsshipintl.Packages.Add(new PackageDetail( ));upsshipintl.Packages[0].Packages=TPackagingTypes.ptPriority upsshipintl.Packages[0].Shipping="..\\..\\temp\\shipping_upsshipintl.Packages[0].Length=20;upsshipintl.Packages[0]. Wilrijk=20;upsshipintl.Packages[0].Height=10;upsshipintl.Packages[0].Weight="26.0";upsshipintl.Config("MICost"upsshipintl.Config("MIPackages"upsshipintl.GetShipmentLabels

 

UPS Mail

rharper@messtone.com:cloudSHELL~(messtone-161906)$Project Messtonebase64.get`UPS Mail Innovation®with the Shipping Integrator`Upsship upsship=new Upsship( );Upsship.UPSAccount.server="https://wwwcie.ups.com/upsship.UPSAccount.AccessKey="xxxxxxxxxxxxxxxx";upsship.UPSAccount.Userrharper@messtone.comId="xxxxxxx";upsship.UPSAccount.Password="xxxxxxx";.upsship.UPSAccount.Account="xxxxxxx";upsship.ServiceType=ServiceTypes.stUPSPriority upsship.LabelImageType=UpsshipLabelImageTypes.upsship.SenderContact.CompanyMesstone="sender company messtone";upsship.SenderContact.FirstName="Robert";upsship.SenderContact.LastName="Harper";upsship.SenderContact.Phone="9195447070";upsship.SenderAddress.Addr="5007 Southpark Drive";upsship.SenderAddress.Addr="Suite 240";upsship.SenderAddress.City="Durham";upsship.SenderAdress.State="NC";upsship.SenderAddress.ZipCode="27713";upsship.RecipientContact.Company="recipient company messstone";upsship.RecipientContact.FirstName="Robert";upsship.RecipientContact.LastName="Harper";upsship.RecipientContact.Phone="0000000000";upsship.RecipientAddress.Address="4 New York Plaza";upsship.RecipientAddress.City="New York";upsship.RecipientAddress.State="NY";upsship.RecipientAddress.ZipCode="10004";upsship.Packages.Add(new PackagesDetail( ));upsship.Packages[0].Packages=TPackagingTypes.ptPriority;upsship.Packages[0].Shipping="..\\..\\temp\\shipping_upsship.Packages[0].Length=20;upsship.Packages[0].Weight=20;upsship.Packages[0].Height=10;upsship.Packages[0].Weight="26.0";upsship.Config("MICostCenter.upsship.Config("MIPackageID"upsship.GetShipmentLabels( );