投稿時間:2022-08-11 06:22:35 RSSフィード2022-08-11 06:00 分まとめ(26件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS AWS Concurrent Query Execution using Amazon Redshift Query Editor V2 | Amazon Web Services https://www.youtube.com/watch?v=7y-f1wlyVhI Concurrent Query Execution using Amazon Redshift Query Editor V Amazon Web ServicesAmazon Redshift Query Editor V a web based tool that you can use to explore analyze and share data using SQL It allows you to explore analyze share and collaborate on data stored on Amazon Redshift It supports data warehouses on Amazon Redshift and data lakes through Amazon Redshift Spectrum The Query Editor V now supports Concurrent Query Execution using a Multi Tab Interface You can now execute queries in parallel and view results as data or charts download them for analysis You may also configure this concurrency setting in account settings view your current tab for the connection close connections that are not in use All these multi tab query editor features are also applicable for SQL notebooks Learn more about AWS Also visit Subscribe More AWS videos More AWS events videos ABOUT AWSAmazon Web Services AWS is the world s most comprehensive and broadly adopted cloud platform offering over fully featured services from data centers globally Millions of customers ーincluding the fastest growing startups largest enterprises and leading government agencies ーare using AWS to lower costs become more agile and innovate faster AWS AmazonWebServices CloudComputing AWSDemos 2022-08-10 20:22:48
海外TECH Ars Technica Amazon begins large-scale rollout of palm print-based payments https://arstechnica.com/?p=1872964 activists 2022-08-10 20:14:35
海外TECH Ars Technica Were bones of Waterloo soldiers sold as fertilizer? It’s not yet case closed https://arstechnica.com/?p=1861820 graves 2022-08-10 20:00:53
海外TECH DEV Community Use No-Code Security Testing https://dev.to/intesar/use-no-code-security-testing-3dhb Use No Code Security Testing Why security test your applications APIs According to Gartner Applications APIs are the most attacked vector Regulatory compliances like HIPAA SOC ISO PCI DSS etc mandate application security testing Why is security testing hard Manual Basic stuff is automated but the rest is human drivenExpensive Ranges from k to kNoisy Reports Low quality and nice to have suggestions frustrate developers What is No Code security testing No need to write codeNo configuration is required either Use No Code Security Tool EthicalCheck devWe built this tool to help fellow developers like you The web tool is so simple everyone should try and bookmark it Paste your OpenAPI Swagger URLGet a free and instant PDF vulnerability report Key features No code and configuration requiredDetect OWASP API vulnerabilitiesNo sign up requiredFree and instant PDF reports 2022-08-10 20:49:18
海外TECH DEV Community The MongoDB CRUD Database Operations🍃 https://dev.to/kithminiii/the-mongodb-crud-database-operations-999 The MongoDB CRUD Database OperationsThis article explains MongoDB CRUD operations to you the four primary database operations in any database They enable you to Create Read Update and Delete data from your Database The CRUD acronym stands for C CreateR ReadU UpdateD DeleteCreateThe C stands for Create This is how you add new items to your Database The items may be objects or individual items If the collection doesn t exist this operation will create a new one for you Collection in this case refers to the name of your Database Below is an example of how you insert items into a database called students You can insert one or many at the same time db collection insertOne db collection insertMany ReadThis operation enables us to read the information available in our Database from the name itself We use a method called to find to do this db collection find find with no query inside returns the entire database db collection find query Inside the bracket you feed the specific item you are looking for UpdateThis operation helps one make changes to an already existing database Inside the brackets you will specify the value pairs you are interchanging or the ones you re adding inside db collection updateOne db collection updateMany DeleteDelete the object or items that you do not want in your collection MongoDB provides the following methods for deleting Similar to the insert command you can delete one or delete many simultaneously db collection deleteOne db collection deleteMany I hope this makes your life easier Happy Coding ​ ​ 2022-08-10 20:28:10
海外TECH DEV Community Getting Started With Non-relational Databases Using Mongodb 🍃 https://dev.to/kithminiii/getting-started-with-non-relational-databases-using-mongodb-4eei Getting Started With Non relational Databases Using Mongodb What is a relational database If you ve worked with databases for a while chances are you started your career using a relational database Examples of a relational databases are Microsoft Access MySql Oracle etc A relational database is a conventional database that uses tables to store data In a relational database each field data type is defined That is if you define a particular field to accept only numbers for example age of a person that field will not accept any character from a z What is a non relational database Before discussing fully what a non relational database is it is needful to define some key terminologies which can help us better understand a non relational database and how it operates These are Key value pairs Document Collections Key value pairsKey value pairs are identifiers and corresponding values A simple way to know how this work is assuming one walks into a bar and asks for a waiter The “waiter in this scenario is the identifier while the name of the waiter for example “Bhagya is the value So in JSON format this can be represented as shown below waiter Bhagya Indimagedara What is a document Documents are a set of JSON data It is basically a set of key value pairs that give you detailed information about an entity Below is an example of a document for our waiter example It contains personal information about the waiter id name Bhagya Indimagedara username bhagya email bhagya mongo com phone website bhagya org What is a collection Collections are a set of documents That is information about more than one entity In a relational database collections are what are known as tables id name Bhagya Indimagedara username bhagya email bhagya mongo com phone website bhagya org id name Nimesh Indimagedara username Nimezzz email Snimesh codebrix com phone website nimesh net id name Nethmini username nethmini email nethmini bk net phone website nethmini info So with the aforementioned defined terms we can define a non relational database as a database that stores data in JSON like format which is achieved through key value pairs Examples of non relational databases are MongoDB Redis Couchbase etc Getting started with MongoDB MongoDB is a non relational database That is it doesn t store data in columns and rows but in BSON format It is an open source database founded in Open source applications are software whose codebase is open to contributions from other developers Working with MongoDB can be in two variants We can either access it online using MongoDB atlas or download it locally on our computer For local downloads we have two editions which are enterprise and community editions The enterprise edition is the paid version while the community version can be used for free obviously with limited capabilities when compared to the former We can access it online via•MongoDB shell•MongoDB compassRegistering for MongoDB AtlasBefore using any of the tools to start performing database operations you need to register an account with MongoDB Atlas It is a cloud database that is all instead of hosting your own server you just need to register and it ll take care of what you need to do at the backend To create an atlas account follow the steps belowGo to mongodb comFor practice click on the Try Free option This allows you to work with Atlas for development purposes A bio data form will come up fill in the required details You can also use your Gmail account to sign up Next you log in using the login details you just createdYou can now proceed with deploying a free cluster by clicking on Build a cluster Three different option is available to you the dedicated and serverless option are both paid version for development purpose click on the shared version You can now proceed to select a cloud provider and region Click on create cluster button After registration you need to create a username and password alongside enabling database access Click database access It will prompt you to add a database user Enter your preferred username and password Click on network access on the left pane Click on Add IP Address You can choose to allow specific IP addresses or for development purposes you can just allow access from anywhere Click on confirm Now you can proceed to use MongoDB Shell or Compass Using MongoDB shellMongoDB shell is a command line environment that can be used to access your database Using MongoDB compassMongoDB Compass is a tool like MongoDB shell that can be used to interact with our database However unlike the MongoDB shell which is primarily a command prompt interface compass has a graphical user interface that makes it easy to work with To download and work with compass follow the instruction below Download and install Go back to your Atlas homepage and click on connect Click on connect using MongoDB Compass Copy the connection string from Atlas and paste it into the file path shown below Click connect If your connection is successful you should see all databases created will be listed You can view them by clicking on each one And you can also create a new database by clicking on the create database button MongoDB compass lets you create your database collection and document in a very seamless way If you would like to explore more you can refer to the official documentation For this tutorial we ll be focusing on the MongoDB shell which is a little bit complex So let s look at how we can perform CRUD operations using the MongoDB shell Performing CRUD operations on our databaseCRUD is an acronym for creating reading updating and deleting in programming For one to perform the read update or delete operation a record has to be created initially on the database Creating a record is adding data about an entity Read operation means to get or view records in the database The update operation is to make changes to the record that is in view Delete operation means to remove a specific record 2022-08-10 20:28:06
海外TECH DEV Community Setting up a Spring Boot application with MongoDB🍃 https://dev.to/kithminiii/setting-up-a-spring-boot-application-with-mongodb-20cf Setting up a Spring Boot application with MongoDBSpring Boot provides excellent support for applications accessing MongoDB as a database The following preparations are necessary to create our own application using Spring Data MongoDB ConfigurationAs a document oriented database MongoDB will not be connected to our application using Hibernate as an ORM layer Instead we add spring boot starter data mongodb as a dependency to our app providing a similar approach to accessing MongoDB using POJOs and repositories lt dependency gt lt groupId gt org springframework boot lt groupId gt lt artifactId gt spring boot starter data mongodb lt artifactId gt lt dependency gt Required Maven dependencyWith this dependency in place we can extend our application ymlor application properties with a URI If the database does not exist yet MongoDB will create it automatically With setting auto index creation to true unique indexes are added during the startup of our app if they are annotated in our documents with Indexed unique true spring data mongodb uri mongodb localhost mongospring data mongodb auto index creation trueOnly the URI is required for a successful database connectionIn our configuration class EnableMongoRepositories should be set This will search for classes in the specified package that extend MongoRepository an example of this will be given in a moment By providing that ValidatingMongoEventListener all documents are validated before persisting we can extend their fields with javax validation constraints like NotNull Configuration EnableMongoRepositories io bootify mongo repos public class MongoConfig Bagya public ValidatingMongoEventListener validatingMongoEventListener final LocalValidatorFactoryBean factory return new ValidatingMongoEventListener factory The first version of our configFurthermore we want to enable transaction support for our application This allows us for example to mark the methods of our services as Transactional Please note that this requires our MongoDB instance to be initialized as a replica set to support this feature Bagyapublic MongoTransactionManager transactionManager final MongoDatabaseFactory databaseFactory return new MongoTransactionManager databaseFactory Adding transaction support to our configExample Document and RepositoryWith these preparations we can already define a simple document and its associated repository For our example we use a primary key of type String which is automatically generated by MongoDB as ObjectID if we do not provide it Documentpublic class Customer Id private String id Size max private String firstName Size max private String lastName Indexed unique true NotNull Size max private String email Our first POJO mapped to a collection named “customer We add our repository by extending MongoRepository It works in the same way as known from Spring Data and can be extended with custom queries public interface CustomerRepository extends MongoRepository lt Customer String gt Customer findByEmail String email Basic Repository for MongoDBWith this all preparations are done to connect our Spring Boot application with MongoDB In Bootify s Free plan we can generate the application with our custom database schema without registration The runnable source code of our application is then directly available for download 2022-08-10 20:27:00
海外TECH DEV Community AWS de dev pra dev: Credentials e acesso programático - parte 1 https://dev.to/hugaomarques/aws-de-dev-pra-dev-credentials-e-acesso-programatico-parte-1-9mg AWS de dev pra dev Credentials e acesso programático parte Inicialmente a idéia desse post era abordar conceitos sobre AWS IAM mas eu acabei desistindo porque essa informação tem na documentação Além disso o AWS IAM étão vasto que o post ia ser infinito Dessa forma a proposta aqui édiferente Eu vou tentar responder algumas perguntas comuns que eu recebo vejo sobre IAM Como tem muita coisa eu vou dividir esse post em partes Nessa primeira parte eu irei focar em credentials de IAM Users e acesso programático usando a AWS CLI Vamos lá Pre requisitosInstale a AWS CLIPossuir uma conta na AWSCriar um ou mais IAM User no AWS IAM Onde eu consigo minhas credentials Sempre que um IAM user écriado édada a opção para acesso programático Se a opção for selecionado vocêvai receber uma access key e uma secret key Essas são as suas credentials para acesso programático SDK CLI Como eu posso configurar minhas credentials As credentials podem ser configuradas de diversas formas Os usos mais comuns são AWS CLIarquivo manual ou gerado pela CLI variável de ambiente AWS CLIVocêpode usar o comando aws configure para fornecer as suas credentials O output seria algo do tipo aws configureAWS Access Key ID TEK AIDAVGDKXECDYBSYKXEAWS Secret Access Key eRkE wJalrXUtnFEMI KMDENG bPxRfiCYEXAMPLEKEYDefault region name None us east Default output format None jsonNote os arquivos que são gerado na máquina ls awsconfig credentialsE se olharmos dentros desses arquivos cat aws config default region us east output jsoncat aws credentials default aws access key id sdsadaaws secret access key sadsadasdsadPerceba como o output segue os dados que fornecemos no comando aws configure ArquivoOs arquivos acima também pode ser criados e editados manualmente Vocêpode simplesmente fazer vim aws credentialsE sair editando o seu arquivo Sótenha certeza que vocêsabe sair do VIM antes de fazer isso Variável de ambienteVocêpode dar override nos arquivos acima usando variáveis de ambiente export AWS ACCESS KEY ID AIDAVGDKXECDYBSYKXE export AWS SECRET ACCESS KEY wJalrXUtnFEMI KMDENG bPxRfiCYEXAMPLEKEY export AWS DEFAULT REGION us west Inclusive um erro comum éa pessoa ter a variável de ambiente setada e por isso a CLI ou a SDK não lêa credential do arquivo Note que se vocêcometer algum typo a CLI vai continuar pegando as credentials do arquivo Logo se vocêsetou a variável de ambiente e mesmo assim ela não táfuncionando verifique se vocênão cometeu algum erro de typo Como eu sei qual User eu estou usando Uma forma rápida de verificar isso éfazer a chamada aws sts get caller identity UserId AIDAVGDKXECDYBSYKXE Account Arn arn aws iam user hugo readonly Ok agora que eu tenho credentials e agora Como eu posso invocar as APIs do AWS Agora vocêpode executar chamadas ao AWS através da AWS CLI ou utilizando uma das várias SDKs que o AWS provê Pra demonstrar isso vamos utilizar uma das APIs do DynamoDB O AWS DynamoDB éum banco de dados NoSQL do AWS Que tal listarmos as tabelas do nosso banco de dados Se tentarmos usar o comando aws dynamodb help ele lista a documentação e as APIs que podemos usar A CLI também lista as opções possível se fornecemos um comando errado Por exemplo aws dynamodb listusage aws options lt command gt lt subcommand gt lt subcommand gt parameters To see help text you can run aws help aws lt command gt help aws lt command gt lt subcommand gt helpaws error argument operation Invalid choice valid choices are batch execute statement batch get itembatch write item create backupcreate global table create tabledelete backup delete itemdelete table describe backupdescribe continuous backups describe contributor insightsdescribe endpoints describe exportdescribe global table describe global table settingsdescribe kinesis streaming destination describe limitsdescribe table describe table replica auto scalingdescribe time to live disable kinesis streaming destinationenable kinesis streaming destination execute statementexecute transaction export table to point in timeget item list backupslist contributor insights list exportslist global tables list tableslist tags of resource put itemquery restore table from backuprestore table to point in time scantag resource transact get itemstransact write items untag resourceupdate continuous backups update contributor insightsupdate global table update global table settingsupdate item update tableupdate table replica auto scaling update time to livewizard waithelpObserve como existem várias APIs list Beleza agora que temos permissões para listar vamos chamar a API list tables Eu criei uma tabela sópra demonstrar o uso da CLI aws dynamodb list tablesAn error occurred AccessDeniedException when calling the ListTables operation User arn aws iam user hugo readonly is not authorized to perform dynamodb ListTables on resource arn aws dynamodb us east table because no identity based policy allows the dynamodb ListTables actionOpa deu erro de permissão e agora Eu não tenho permissão pra invocar a API que eu quero E agora Lembre se que suas chamadas são restritas às permissões que seu User possui Durante a criação do seu User épossível aplicar policies com permissões ou adicionar o User a um grupo que possui algumas permissões Boa prática Crie grupos para seus IAM Users Adicione as policies para esses grupos e associe seus usuários aos grupos Evite associar policies aos usuários diretamente Para detalhes de como adicionar uma policy ao usuário vocêpode seguir a documentação oficial Para simplificar eu vou adicionar as permissões diretamente ao usuário mas como boa prática vocêdeveria criar um grupo devs por exemplo e associar seu usuário ao grupo Eu adicionei ao meu usuário a policy existente do AWS chamada AmazonDynamoDBReadOnlyAccess Essa policy me dáacesso a várias APIs incluindo as seguintes APIs do DynamoDB Version Statement Action dynamodb BatchGetItem dynamodb Describe dynamodb List dynamodb GetItem dynamodb Query dynamodb Scan dynamodb PartiQLSelect Effect Allow Resource Notem como a policy me dádireito a chamar a API DynamoDB List Ou seja todas as APIs do DynamoDB que começam com List Agora que temos a permissão podemos finalmente chamar a API aws dynamodb list tables TableNames hugo teste Bacana né Jáque temos o nome da tabela e se quisermos mais informações sobre ela Olhando a lista de APIs ali em cima nós vemos que temos permissão para fazer um describe table aws dynamodb describe table hugo testeusage aws options lt command gt lt subcommand gt lt subcommand gt parameters To see help text you can run aws help aws lt command gt help aws lt command gt lt subcommand gt helpaws error the following arguments are required table nameOpa deu erro Faltou o argumento table name aws dynamodb describe table table name hugo teste Table AttributeDefinitions AttributeName my partition key AttributeType S TableName hugo teste KeySchema AttributeName my partition key KeyType HASH TableStatus ACTIVE CreationDateTime T ProvisionedThroughput LastDecreaseDateTime T NumberOfDecreasesToday ReadCapacityUnits WriteCapacityUnits TableSizeBytes ItemCount TableArn arn aws dynamodb us east table hugo teste TableId daa b d e cdcdab Mas eu tenho Users pra Dev e outro pra QA Como manter usuários na mesma máquina Vocêpode usar as variáveis de ambiente pra fazer override como a gente discutiu antes ou vocêpode usar profiles Boa prática Use profiles para manter acesso a diversos IAM Users diferentes na sua máquina Por exemplo eu vou conferir perfis no meu arquivo aws credentials e aws config cat aws credentials default aws access key id AIDAVGDKXECDYBSYKXEaws secret access key wJalrXUtnFEMI KMDENG bPxRfiCYEXAMPLEKEY qa aws access key id AKIAVGDKXECDVLJTNZaws secret access key wJalrXUtnFEMI KMDENG bPxRfiCYSAMPLEKEY cat aws config default region us east output jsoncli pager profile qa region us east output jsoncli pager Note a diferença sútil na sintaxe do arquivo O arquivo config usa o prefixo profile antes do nome QA Agora eu tenho a opção de invocar a CLI usando o profile default sem argumentos aws sts get caller identity UserId AIDAVGDKXECDYBSYKXE Account Arn arn aws iam user hugo readonly Ou eu posso invocar a CLI passando o profile que eu desejo assumir aws sts get caller identity profile qa UserId AKIAVGDKXECDVLJTNZ Account Arn arn aws iam user hugo readonly A AWS CLI ébem útil pra fazer scripts ou pra testar algo rápido Por exemplo eu usei bastante ela no passado para submeter AWS Cloudformation templates pro AWS criar todos os meus recursos durante desenvolvimento testes ConclusãoVamos fechar a parte por aqui Recapitulando atéagora nós vimos Como configurar suas credenciaisComo verificar com qual identity vocêestárealizando suas chamadasComo as permissões te permitem executar chamadas ao AWS de forma programática bônus Como usar a AWS CLI para interagir com as APIs do AWS programaticamenteUtilizar diferentes profiles para armazenar credentials para diferentes IAM Users Nos próximos posts nós vamos discutir mais sobre IAM Roles e acesso programático usando SDKs e credential providers Curtiu Dáo seu like e deixa perguntas que eu vou respondendo 2022-08-10 20:05:17
Apple AppleInsider - Frontpage News Disney+ to hike prices, introduce ad-supported tier in December https://appleinsider.com/articles/22/08/10/disney-to-hike-prices-introduce-ad-supported-tier-in-december?utm_medium=rss Disney to hike prices introduce ad supported tier in DecemberDisney will introduce a new ad supported tier of its streaming service later in while hiking the price of the current ad free plans including bundles with Hulu and ESPN Disney The new pricing structure which will also include ad supported versions of its Hulu and ESPN services will officially debut to the public on Dec Disney announced on Wednesday Read more 2022-08-10 20:39:22
海外TECH Engadget Disney+ ad-free streaming price increases to $11 per month in December https://www.engadget.com/disney-plus-price-increase-ad-based-service-204903273.html?src=rss Disney ad free streaming price increases to per month in DecemberDisney isn t done raising prices As part of its third quarter earnings report Disney revealed that it s hiking the price of the ad free service in the US to per month more than today on December th If you want to keep the same price you ll have to subscribe to the ad supported tier launching the same day In other words the ad backed plan won t really be cheaper ーyou ll just have to pay more to keep the uninterrupted experience you already have The media giant also said it would raise the price of ad free Hulu by to per month on October th If you can accept ads you ll also pay per month instead of today s A monthly outlay provides both Disney and Hulu with ads A bundle offering ad free Disney ad supported ESPN and its Hulu counterpart is climbing by a dollar to per month but you ll dip to per month if you re willing to tolerate commercials across all three You ll have to pay per month to get the trio without any sales pitches Disney wasn t shy about the reason for the price hikes Although it added million Disney subscribers during the quarter for a total of million across all services the operating losses for its streaming oriented division surged from million a year ago to nearly billion The production costs for Disney and Hulu are soaring and Disney wants to make that money back The performance contrasts sharply with a key rival While Netflix is prepping its own ad driven plan it s currently losing customers ーit s counting on advertising to return growth where Disney is simply hoping to make a profit As rough as its finances might be Disney is in a stronger position 2022-08-10 20:49:03
海外科学 NYT > Science London Plans Polio Vaccine Boosters as More Virus Is Found in Sewage https://www.nytimes.com/2022/08/10/world/europe/uk-london-polio-vaccine-sewage.html London Plans Polio Vaccine Boosters as More Virus Is Found in SewageChildren of ages to in the city will be offered a booster after signs that the virus was turning up more frequently in samples No cases have so far been reported 2022-08-10 20:17:59
ニュース BBC News - Home Aine Davis: Alleged fourth IS 'Beatle' arrested in UK on terror charges https://www.bbc.co.uk/news/uk-62495025?at_medium=RSS&at_campaign=KARANGA beatles 2022-08-10 20:42:21
ニュース BBC News - Home Donald Trump refuses to answer questions in New York investigation https://www.bbc.co.uk/news/world-us-canada-62494861?at_medium=RSS&at_campaign=KARANGA authorities 2022-08-10 20:01:12
ニュース BBC News - Home Jonathan Edwards: Wife assault MP to represent Plaid in Commons https://www.bbc.co.uk/news/uk-wales-politics-62493896?at_medium=RSS&at_campaign=KARANGA cymru 2022-08-10 20:46:24
ニュース BBC News - Home Real Madrid 2-0 Eintracht Frankfurt: Karim Benzema scores 324th goal for Real in Super Cup win https://www.bbc.co.uk/sport/football/62475679?at_medium=RSS&at_campaign=KARANGA Real Madrid Eintracht Frankfurt Karim Benzema scores th goal for Real in Super Cup winKarim Benzema continues his Ballon d Or pursuit with a th goal for Real Madrid to help them beat Eintracht Frankfurt in the Uefa Super Cup 2022-08-10 20:54:16
ニュース BBC News - Home Will Smeed hits The Hundred's first ever 100 - watch his best shots https://www.bbc.co.uk/sport/av/cricket/62499867?at_medium=RSS&at_campaign=KARANGA Will Smeed hits The Hundred x s first ever watch his best shotsWill Smeed makes history by becoming the first player to hit a century in The Hundred watch the best shots from his blistering unbeaten for Birmingham Phoenix against Southern Brave at Edgbaston 2022-08-10 20:18:22
ニュース BBC News - Home Diamond League: Shelly-Ann Fraser-Pryce runs fourth-fastest women's 100m ever https://www.bbc.co.uk/sport/athletics/62499909?at_medium=RSS&at_campaign=KARANGA Diamond League Shelly Ann Fraser Pryce runs fourth fastest women x s m everShelly Ann Fraser Pryce runs the fourth fastest ever women s m seconds as she wins at the Diamond League in Monaco 2022-08-10 20:46:20
ニュース BBC News - Home The Hundred: Will Smeed hits competition's first century for Birmingham Phoenix https://www.bbc.co.uk/sport/cricket/62498038?at_medium=RSS&at_campaign=KARANGA The Hundred Will Smeed hits competition x s first century for Birmingham PhoenixWill Smeed makes history by becoming the first player to hit a century in The Hundred after hitting a blistering not out for Birmingham Phoenix against Southern Brave 2022-08-10 20:18:50
ビジネス ダイヤモンド・オンライン - 新着記事 戦闘機パイロットは年収1100万円!自衛官の給料と出世ルート大公開、最高額は意外な職種 - 軍事ビジネス&自衛隊 10兆円争奪戦 https://diamond.jp/articles/-/307603 奪還作戦 2022-08-11 05:25:00
ビジネス ダイヤモンド・オンライン - 新着記事 国防めぐり「エリート4省庁」が権力闘争、財務・経産・外務・警察が対立する理由 - 軍事ビジネス&自衛隊 10兆円争奪戦 https://diamond.jp/articles/-/307602 国防めぐり「エリート省庁」が権力闘争、財務・経産・外務・警察が対立する理由軍事ビジネス自衛隊兆円争奪戦防衛省に昇格する前の防衛庁は、財務省出身者が防衛次官となる“財務省の植民地だった。 2022-08-11 05:20:00
ビジネス ダイヤモンド・オンライン - 新着記事 朝日・日経・毎日…新聞大手シニア社員の年収は役職定年で天と地の差、意外な好待遇地方紙も - 中高年の給料激減!主要企業のデータ初公開!大企業の5割導入 役職定年の悲哀 https://diamond.jp/articles/-/307230 千差万別 2022-08-11 05:15:00
ビジネス ダイヤモンド・オンライン - 新着記事 安倍氏が国際社会に残した「最悪の遺産」とは?オランダ人ジャーナリストが赤裸々指摘 - 安倍晋三 レガシーの検証 https://diamond.jp/articles/-/307549 国際社会 2022-08-11 05:10:00
ビジネス ダイヤモンド・オンライン - 新着記事 塩野義製薬のコロナ飲み薬が「袋だたき」に遭った理由、緊急承認再び見送りに - 医薬経済ONLINE https://diamond.jp/articles/-/307733 online 2022-08-11 05:05:00
北海道 北海道新聞 中川町で震度5強 漏水、道路陥没の情報 道北で地震相次ぐ 津波の心配なし 「1週間は揺れに注意を」 https://www.hokkaido-np.co.jp/article/716659/ 津波の心配 2022-08-11 05:30:55
ビジネス 東洋経済オンライン ダイハツ「ウェイク」がたった1世代で終わる事情 タント上回る高さ183cmの大空間も決め手ならず | 軽自動車 | 東洋経済オンライン https://toyokeizai.net/articles/-/610258?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2022-08-11 05:30:00
GCP Cloud Blog Utilizing Support API to Extend Support’s Functionality https://cloud.google.com/blog/topics/developers-practitioners/utilizing-support-api-extend-supports-functionality/ Utilizing Support API to Extend Support s FunctionalityHave you ever thought of leveraging Google Cloud s Support API to programmatically manage your support cases Or what if you wanted to create some scripts that can be plugged into your existing support case management system In this blog post I ll walk you through how we can utilize Google Cloud s Support API in order to solve a very particular use case a company is facing  NOTE Be very careful when making requests to the Cloud Support API as this affects live cases that could notify live support agents when updated If you are just testing the API be sure to create cases with the testCase flag set to true Problem The company wants to copy the operations team s email alias to each support case that is open One way to do this is to manually go through each support case in the GCP console to add the email address But this can get very tedious especially if they have many active support cases Solution  To solve this problem we can write a simple Java program that will update all open cases with the email address that they want to include This blog is going to walk you through the steps of the solution but feel free to refer to the final code here Before you begin We need to set up the following before getting started Verify that you have a GCP account with at least Standard SupportEnable “Google Cloud Support API in your Cloud Console s API amp Services page Create a service account with the following roles “Organization Viewer role or any role that grants the “resourcemanager organizations get permission“Tech Support Editor roleDownload the service account s private key in a JSON format and set your environment variable “GOOGLE APPLICATION CREDENTIALS to point to its path Let s start coding Step Initialize a Java projectYou ll first need to initialize a Java project I highly recommend using build automation tools like maven in order to do so You may follow the quickstart guide here to initialize your Java project Step Add dependencies for Cloud Support APIThere are three main dependencies that are needed for our Java program to connect with the Cloud Support API Google API Client Library for Java Cloud Support API Client Library for Java v beta and Google Auth Library Since we are using maven it s as simple as adding these three dependencies into your pom file for these to be included in your Java project code block StructValue u code u lt dependency gt r n lt groupId gt com google api client lt groupId gt r n lt artifactId gt google api client lt artifactId gt r n lt version gt lt version gt r n lt dependency gt r n r n lt dependency gt r n lt groupId gt com google apis lt groupId gt r n lt artifactId gt google api services cloudsupport lt artifactId gt r n lt version gt vbeta rev lt version gt r n lt dependency gt r n r n lt dependency gt r n lt groupId gt com google auth lt groupId gt r n lt artifactId gt google auth library oauth http lt artifactId gt r n lt version gt lt version gt r n lt dependency gt u language u u caption lt wagtail wagtailcore rich text RichText object at xeece gt Step Add the boilerplate code to your projectYou may use the boilerplate code that I ve written below to simplify your code code block StructValue u code u import com google api client googleapis javanet GoogleNetHttpTransport r nimport com google api client http HttpRequestInitializer r nimport com google api client http HttpTransport r nimport com google api client json JsonFactory r nimport com google api client json gson GsonFactory r nimport com google api services cloudsupport vbeta CloudSupport r nimport com google api services cloudsupport vbeta model CloudSupportCase r nimport com google api services cloudsupport vbeta model ListCasesResponse r nimport com google auth http HttpCredentialsAdapter r nimport com google auth oauth GoogleCredentials r nimport java io IOException r nimport java security GeneralSecurityException r nimport java util ArrayList r nimport java util Collections r nimport java util List r nimport javax swing JOptionPane r n r n r n starter code for cloud support API to initialize it r npublic class App r n r n Shared constants r n static final String CLOUD SUPPORT SCOPE r n r n static String projectResource projects r n r n public static void main String args r n r n try r n CloudSupport cloudSupport getCloudSupportService r n with the CloudSupport object you may call other methods of the Support API r n for example cloudSupport cases get name of case execute r n r n System out println CloudSupport API is ready to use cloudSupport r n r n projectResource projectResource JOptionPane showInputDialog Please enter your project number r n r n r n catch IOException e r n System out println IOException caught n e r n r n catch GeneralSecurityException e r n System out println GeneralSecurityException caught n e r n r n r n r n helper method will return a CloudSupport object which is required for the r n main API service to be used r n public static CloudSupport getCloudSupportService throws IOException GeneralSecurityException r n r n JsonFactory jsonFactory GsonFactory getDefaultInstance r n HttpTransport httpTransport GoogleNetHttpTransport newTrustedTransport r n r n this will only work if you have already set the environment variable r n GOOGLE APPLICATION CREDENTIALS to point to the path with your service account r n key r n GoogleCredentials credentials GoogleCredentials getApplicationDefault r n createScoped Collections singletonList CLOUD SUPPORT SCOPE r n HttpRequestInitializer requestInitializer new HttpCredentialsAdapter credentials r n r n return new CloudSupport Builder httpTransport jsonFactory requestInitializer build r n r n r n u language u u caption lt wagtail wagtailcore rich text RichText object at xeeced gt This boilerplate code has one main helper function getCloudSupportService This is used to authenticate your app to the Cloud Support API and create a CloudSupport object which is the starting point for all other Cloud Support API calls Step Write methods to update cc field of active casesYou may include the helper methods below to your app to implement the ability to update the cc field of active cases This post assumes that you have at least one open support case code block StructValue u code u public static void updateAllEmailsWith String email throws IOException GeneralSecurityException r n r n List lt CloudSupportCase gt listCases listAllCases projectResource r n r n for CloudSupportCase csc listCases r n System out println I m going to update email address for case csc getName n r n r n updateCaseWithNewEmail csc email r n r n r n r n list all open cases r n public static List lt CloudSupportCase gt listAllCases String parentResource r n throws IOException GeneralSecurityException r n r n CloudSupport supportService getCloudSupportService r n r n ListCasesResponse listCasesResponse supportService cases list parentResource setFilter state OPEN r n execute r n r n List lt CloudSupportCase gt listCases listCasesResponse getCases r n r n System out println r n Printing all listCases size open cases of parent resource parentResource r n r n for CloudSupportCase csc listCases r n System out println csc n n r n r n r n return listCases r n r n r n this helper method is used in updateAllEmailsWith r n private static void updateCaseWithNewEmail CloudSupportCase caseToBeUpdated String email r n throws IOException GeneralSecurityException r n List lt String gt currentAddresses caseToBeUpdated getSubscriberEmailAddresses r n CloudSupport supportService getCloudSupportService r n if caseToBeUpdated getState toLowerCase equals closed r n System out println Case is closed we cannot update its cc field r n return r n r n if currentAddresses null amp amp currentAddresses contains email r n currentAddresses add email r n CloudSupportCase updatedCase caseToBeUpdated setSubscriberEmailAddresses currentAddresses r n Ensure that severity is not set Only priority should be used or else r n this will throw an error r n updatedCase setSeverity null r n r n supportService cases patch caseToBeUpdated getName updatedCase execute r n System out println I updated the email for n updatedCase n r n r n must handle case when they don t have any email addresses r n else if currentAddresses null r n currentAddresses new ArrayList lt String gt r n currentAddresses add email r n CloudSupportCase updatedCase caseToBeUpdated setSubscriberEmailAddresses currentAddresses r n supportService cases patch caseToBeUpdated getName updatedCase execute r n System out println I updated the email for updatedCase n r n r n else r n System out println Email is already there n n r n r n u language u u caption lt wagtail wagtailcore rich text RichText object at xeecfaf gt The code snippet above has three methods  updateAllEmailsWith  listAllCases  updateCaseWithNewEmail Note that updateAllEmailsWith has to first call listAllCases in order to get all open support cases Afterwards it will call updateCaseWithNewEmail for each open support case in order to update it to include the new email address Also note that when calling listAllCases you need to pass in the parent resource which is specified in the variable projectResource This variable is updated as the app takes in your project number as an input  Step Call updateAllEmailsWith frommain Now that we have set up our app to include all the methods we need what remains is simply calling the method updateAllEmailsWith with the email address that you d like to add It will use all the helper methods that we just wrote in order to get all open support cases and update each one with the email address that we want We re done coding Easy right Leveraging Cloud Support API will definitely make managing your support cases much easier It can help automate some actions that would be very tedious to do Next steps  This example is just one of many different use cases that we can have for the Cloud Support API We can also use the API to create attachments add comments or even search cases Each organization may require different functionalities from Google Cloud s Support and these can be implemented with the use of Cloud Support API For more information check out the following resources bellow Cloud Support API documentation Sample Code for Cloud Support APIGoogle Cloud Support General DocumentationTechnical Support Services Guidelines 2022-08-10 21:00:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)